数列 an=2n-2,n为奇数,an=2n+1,n为偶数,求前n项和sn

问题描述:

数列 an=2n-2,n为奇数,an=2n+1,n为偶数,求前n项和sn

if n 奇数
Sn = (n+1)(an+a1)/4 + (n-1)((a2+a(n-1))/4
= (n+1)(2n-2)/4 +(n-1)( 5 + 2(n-1)+1)/4
= (n+1)(2n-2)/4 + (n-1)(2n-4)/4
=(1/2)(n-1)(n+1+n-2)
= (1/2)(n-1)(2n-1)
if n 偶数
Sn= n(a(n-1)+a1)/4 + n(a2+an)/4
= n(2(n-1)-2)/4 + n(5+2n+1)/4
= n(n-2)/2 + n(n+3)/2
= (1/2)n(n-2+n+3)
=(1/2)n(2n-1)