设数列的前n项的和为sn,等式两边都乘以x得xsn,用xsn-sn得一新数列,求出之和转化即可求出sn.
【解析】
数列的前n项和设sn=1+3x+5x2+…+(2n-1)xn-1①
(1)当x=0时,sn=1;
(2)当x=1时,sn=1+3+5+…+(2n-1)=n2,
(3)当x≠1,x≠0时,给等式两边都乘以x得:x•sn=x+3x2+5x3+…+(2n-3)xn-1+(2n-1)xn②
得:①-②得:(1-x)sn=1+2x+2x2+…+2xn-1-(2n-1)xn=1-(2n-1)xn+2(x+x2+x3+…+xn-1)=1-(2n-1)xn+
则sn=.
综上当x=0时,sn=1;当x=1时,sn=n2;当x≠1时,sn=.