<s>[INST] Find the sum of $-1^2-2^2+3^2+4^2-5^2-6^2+\cdots$ 
Find the sum of $$\sum_{k=1}^{4n}(-1)^{\frac{k(k+1)}{2}}k^2$$

By expanding the given summation,
$$\sum_{k=1}^{4n}(-1)^{\frac{k(k+1)}{2}}k^2=-1^2-2^2+3^2+4^2-5^2-6^2+\cdots+(4n-1)^2+(4n)^2$$
$$=(3^2-1^2)+(4^2-2^2)+(7^2-5^2)+(8^2-6^2)+\cdots+[(4n-1)^2-(4n-3)^2]+((4n)^2-(4n-2)^2)$$
$$=2(4)+2(6)+2(12)+2(14)+2(20)+2(22)+\cdots+2(8n-4)+2(8n-2)$$
$$=2[4+6+12+14+20+22+\cdots+(8n-4)+(8n-2)]$$
How should I proceed further?
 [/INST] We know that $$\begin{align*}1+2+3+...+(4n+1)&=\frac{(4n+1) \cdot (4n+2)}{2}\\&=(2n+1)(4n+1)\end{align*}$$
So, $$\begin{align*}&2+3+(2+2)+(3+2)+6+7+...+(4n-2)+(4n-1)+(4n-2+2)+(4n-1+2)=(2n+1)(4n+1)-1 \\&\implies 2(2+3+...(4n-1))+2n \cdot 2=(2n+1)(4n+1)-1 \\&\implies 2(4+6+6+7+...+(8n-2))=2((2n+1)(4n+1)-4n-1)\\&=16n^2+4n\\&=\fbox{4n(4n+1)}\end{align*}$$
This is what you need. 
</s>