(一)当n为偶数时,
Tn=-1^2+2^2-3^2+4^2.-(n-1)^2+n^2
=3+7+11+.+2n-1
=0.5*(3+2n-1)*(n/2)
=0.5*n*(n+1)
(二)当n为奇数时,
Tn=-1^2+2^2-3^2+4^2.-(n-2)^2+(n-1)^2-n^2
=3+7+11+.+2n-3-n^2
=0.5*(3+2n-3)*[(n-1)/2]-n^2
=-0.5*n*(n+1)
综合(一)(二),Tn=[(-1)^n]*0.5n*(n+1)
(一)当n为偶数时,
Tn=-1^2+2^2-3^2+4^2.-(n-1)^2+n^2
=3+7+11+.+2n-1
=0.5*(3+2n-1)*(n/2)
=0.5*n*(n+1)
(二)当n为奇数时,
Tn=-1^2+2^2-3^2+4^2.-(n-2)^2+(n-1)^2-n^2
=3+7+11+.+2n-3-n^2
=0.5*(3+2n-3)*[(n-1)/2]-n^2
=-0.5*n*(n+1)
综合(一)(二),Tn=[(-1)^n]*0.5n*(n+1)