(x-1)Sn=xSn-Sn
=x+3x^2+5x^3+.+(2n-1)x^n-(1+3x+5x的平方+……+(2n-1)x的n-1次方)
=(2n-1)x^n-1-2(x+x^2+x^3+...+x^n-1)
=(2n-1)x^n-x(1-x^n)/(1-x)-1
Sn=(2n-1)x^n/(1-x)-(x-x^(n+1))/(1-x)^2-1/(1-x)
(x-1)Sn=xSn-Sn
=x+3x^2+5x^3+.+(2n-1)x^n-(1+3x+5x的平方+……+(2n-1)x的n-1次方)
=(2n-1)x^n-1-2(x+x^2+x^3+...+x^n-1)
=(2n-1)x^n-x(1-x^n)/(1-x)-1
Sn=(2n-1)x^n/(1-x)-(x-x^(n+1))/(1-x)^2-1/(1-x)