a1=2
Sn=na1+(n-1)/2d
a1+a2+a3=2*3+(3-1)/2*d=12
d=2
an=a1+(n-1)d
所以an=2+(n-1)*2
bn=2nx^n
Sn=2x+4x^2+6x^3...+2nx^n (1)
xSn=2x^2+4x^3.+2(n-1)x^n+2nx^(n+1) (2)
(1)-(2)
Sn-xSn=2x+2x^2+2x^3...+2x^n-2nx^(n+1)
因为2x+2x^2+2x^3...+2x^n=2x(1-x^n)/(1-x)
所以Sn=2x(1-x^n)/(1-x)^2-2nx^(n+1)/(1-x)