S=1*2^0+2*2^1+3*2^2+……+n*2^(n-1)
2S= 1*2^1+2*2^2+……+(n-1)*2^(n-1)+n*2^n
两式相减,S=-1-2-2^2-……-2^(n-1)+n*2^n=n*2^n-(2^n-1)=(n-1)*2^n+1
S=1*2^0+2*2^1+3*2^2+……+n*2^(n-1)
2S= 1*2^1+2*2^2+……+(n-1)*2^(n-1)+n*2^n
两式相减,S=-1-2-2^2-……-2^(n-1)+n*2^n=n*2^n-(2^n-1)=(n-1)*2^n+1