由已知得,c[2k]=4k-3,c[2k+1]=4k-1+k*2^k,把T[2n+1]分成两部分求和,奇数项和偶数项分别求.
偶数项的和为:4(n+1)n/2-3n;奇数项的和为:4(n+1)n/2 -n-1+2^1+2*2^2+3*2^3+……+n*2^n,
令X=2^1 +2*2^2 +3*2^3 +……+n*2^n
则2X= 2^2 +2*2^3 +……+(n-1)*2^n +n*2^(n+1)
两式相减得到X= -2^1 -2^2 -2^3 -…… -2^n +n*2^(n+1)= 2(1-2^n) +n*2^(n+1);
所以奇数项的和为:4(n+1)n/2 -n-1+2(1-2^n) +n*2^(n+1)
则T[2n+1]=4(n+1)n/2-3n +4(n+1)n/2 -n-1+2(1-2^n) +n*2^(n+1)
=4n^2 +(n-1)2^(n+1) +1