(+1)+(-2)+(+3)+(+3)+(-4)+.+(+2003)+(-2004)

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 11:47:59

(+1)+(-2)+(+3)+(+3)+(-4)+.+(+2003)+(-2004)
(+1)+(-2)+(+3)+(+3)+(-4)+.+(+2003)+(-2004)

(+1)+(-2)+(+3)+(+3)+(-4)+.+(+2003)+(-2004)
当n为偶数时,
S(n)=1²-2²+3²-4²+…+(-1)^(n-1)×n²
=(1-2)(1+2)+(3-4)(3+4)+…+[(n-1)-n][(n-1)+n]
=-[3+7+11+…+(2n-5)+(2n-1)](令n=2k)
=-[3+7+11+…+(4k-5)+(4k-1)]
=-(3+4k-1)k/2
=-k(2k+1)
=-n(n+1)/2;
当n为奇数时,
S(n)=1²-2²+3²-4²+…+(-1)^(n-1)×n²
=1²+(-2²+3²)+(-4²+5²)+…+[-(n-1)²+n²]
=1+(-2+3)(2+3)+(-4+5)(4+5)+…+[-(n-1)+n][(n-1)+n]
=1+5+9+…+(2n-5)+(2n-1)](令n=2k-1)
=1+5+9+…+(4k-7)+(4k-3)]
=(1+4k-3)k/2
=k(2k-1)
=n(n+1)/2
可见,
S(n)=(-1)^(n-1)[n(n+1)]/2