<s>[INST] $1^2 - 2^2 + 3^2 - 4^2 + \dots + 1999^2$ using closed form formula for sum of squares of first $n$ natural numbers The question is simple, the solution, not so much
Q.Find the sum of the given expression $1^2- 2^2 + 3^2 - 4^2 + \dots + 1999^2$
My idea is we know $1^2 + 2^2 + 3^2 + 4^2 + \dots + n^2 = \frac{n(n + 1)(2n +  1)}{6}$
So for $n=1999$ I get the sum as $2,66,46,67,000$
From this I need to subtract the squares of the even terms twice because subtracting once leaves with only the sum of the squares of the odd nos.
I observed something :
$2^2 + 4^2 + 6^2 + \dots + 1998^2 = (2 \cdot 1)^2 + (2 \cdot 2)^2 + \dots + (2 \cdot 999)^2$
Therefore to obtain the sum of the square of the even terms, I can take $4$ as common and use the aforementioned formula for $n=999$ and multiply it by $4$.
therefore sum of square of even terms = $1,33,13,34,000$
I need to subtract this sum twice to get the answer, because subtracting once simply leaves me with the sum of the squares of the odd numbers.
The answer is now $1999000$, which still doesn't match the answer key. Can someone explain where I am going wrong ?
 [/INST] Use the decomposition of squares into triangular numbers, $n^2=T_{n-1}+T_n$, and telescope:
$$1^2-2^2+3^2-\cdots+1999^2=1-(1+3)+(3+6)-(6+10)+\cdots+(T_{1998}+T_{1999})$$
$$=T_{1999}=\frac{1999×2000}2=1999000$$
</s>