<s>[INST] Solve the recurrence of the alternating sum $R_n=R_{n-1}+(-1)^{n}(n+1)^{2}$ I have been trying to solve this recurrence for a few hours, but I haven't been able to find the solution yet:
$R_0=1$
$R_n=R_{n-1}+(-1)^{n}*(n+1)^{2}$.
I have been trying to substitute $T_n=(-1)^{n}*R_n$ and then solving for $T_n$ and got the sum:
$1+3+...+\frac{n(n+1)}{2}$
but this sum $(-1)^{n}\frac{n(n+1)(n+2)}{6}$ didn't give the generalized form that would give the terms of the recurrence.
Additionally, I have been trying to substitute $n=2*a$:
$\sum_{k=1}^a (-1)^{2k}*(2k+1)^{2}+ \sum_{k=1}^a (-1)^{2k-1}*(2k)^2$
and I got $\frac{n*(n+3)}{2}$, but it doesn't seem to be right either. 
Please help me and if you can figure out, please tell me what I did wrong. 
Edited: I have added the initial values.
 [/INST] $$\begin{align}
R_n-R_{n-1}&=(-1)^n(n+1)^2;\qquad R_0=1\\
R_n-\underbrace{R_0}_{=1}&=\sum_{r=1}^{n}(-1)^r(r+1)^2\qquad\text{by telescoping}\\
R_n&=\sum_{r=0}^{n}(-1)^r(r+1)^2\\
&=\sum_{r=1}^{n+1}(-1)^{r-1}r^2\\
\end{align}$$
Note that $-r^2+(r+1)^2=r+(r+1)$.
Hence, for even $n$, 
$$\begin{align}
R_n&=1^2
\underbrace{-2^2+3^2}_{2+3}
\underbrace{-4^2+5^2}_{4+5}+\cdots+\underbrace{-n^2+(n+1)^2}_{n+(n+1)}\\
&=1+2+3+4+\cdots+n+(n+1)\\
&=\frac{(n+2)(n+1)}2=\binom {n+2}2
\end{align}$$
and for odd $n$,
$$\begin{align}
R_n&=
\underbrace{1^2-2^2}_{-1-2}+
\underbrace{3^2-4^2}_{-3-4}+\cdots+\underbrace{n^2-(n+1)^2}_{-n-(n+1)}\\
&=-(1+2+3+4+\cdots+n+(n+1))\\
&=-\frac{(n+2)(n+1)}2=-\binom {n+2}2
\end{align}$$
Hence the general solution is
$$R_n=(-1)^n\frac {(n+2)(n+1)}2=(-1)^n \binom {n+2}2\qquad\blacksquare$$
</s>