Determine the value of −1+2+3+4−5−6−7−8−9+⋯+10000, where the signs change after each perfect square.
Solution — click to reveal
We can express the sum as n=1∑100(−1)nk=(n−1)2+1∑n2k=n=1∑100(−1)n⋅2(n−1)2+1+n2⋅(2n−1)=n=1∑100(−1)n(2n3−3n2+3n−1)=n=1∑100(−1)n(n3+(n−1)3)=−03−13+13+23−23−33+⋯+993+1003=1000000.