设S=1+2x+3x^2+...nx^(n-1)
xS=x+2x^2+3x^3+.nx^n
xS-S=-1-x-x^2-.-x^(n-1)+nx^n
=-(x^n-1)/(x-1)+nx^n
S=nx^n/(x-1)-(x^n-1)/(x-1)^2