若n=2m+1(意思是n为奇数)时,原式可化为:
=-1-7-13-…………-(3n+2) +4+10+16……+(3n+2-6)
=-[1+7+13+……+(3n+2)]+[4+10+16……+(3n-4)]
=-[(1+(3n+2]*(n+1)/2/2+(4+3n-4)*(n-1)/2/2
=-(3n+3)(n+1)/4+3n(n-1)/4
=-3/4*(n+1)^2+3/4*n(n-1)
若n=2m(意思是n为偶数)时,原式可化为:
=-1-7-13-…………-(3n+2-6)+4+10+16……+(3n+2)
=-[1+7+13+……+(3n-4)]+[4+10+16……+(3n+2)]
=-[1+(3n-4)]*n)2/2+(4+3n+2)*n/2/2
=-(3n-3)n/4+(3n+6)n/4
=-3/4*n(n-1)+3/4*n(n+2)