Problem:
12−22+32−42+⋯−(2n)2
Solution:
We will assume the formula:
1+2+⋯+n=n(n+1)2
12+22+⋯+n2=n(n+1)(2n+1)6
We split the sum into two halves:
12+32+52+⋯+(2n−1)2 can be think of as
(2×0+1)2+(2×1+1)2+⋯+(2×(n−1)+1)2
Expanding them we get
(4×02+4×0+1)+(4×12+4×1+1)+⋯+(4(n−1)2+4(n−1)+1).
Grouping terms, factoring and applying the formula, we get
4(n−1)(n)(2n−1)6+4(n−1)(n)2+n
Simplifying we get
n(2n−1)(2n+1)3
The even number squared sum is easier, we can think of them as just a scaled version of the square sum
22+42+⋯+(2n)2
4(12+22+⋯+n2)
The answer is simply 2n(n+1)(2n+1)3
Therefore, the final answer is simply the difference of the two sums, and it is
−n(2n+1)
12−22+32−42+⋯−(2n)2
Solution:
We will assume the formula:
1+2+⋯+n=n(n+1)2
12+22+⋯+n2=n(n+1)(2n+1)6
We split the sum into two halves:
12+32+52+⋯+(2n−1)2 can be think of as
(2×0+1)2+(2×1+1)2+⋯+(2×(n−1)+1)2
Expanding them we get
(4×02+4×0+1)+(4×12+4×1+1)+⋯+(4(n−1)2+4(n−1)+1).
Grouping terms, factoring and applying the formula, we get
4(n−1)(n)(2n−1)6+4(n−1)(n)2+n
Simplifying we get
n(2n−1)(2n+1)3
The even number squared sum is easier, we can think of them as just a scaled version of the square sum
22+42+⋯+(2n)2
4(12+22+⋯+n2)
The answer is simply 2n(n+1)(2n+1)3
Therefore, the final answer is simply the difference of the two sums, and it is
−n(2n+1)