Calculate $\sum\limits_{k=0}^{20}(-1)^k\binom{k+2}2$ without calculating each term separately Is it possible to calculate $\sum_{k=0}^{20}(-1)^k\binom{k+2}2$ without calculating each term separately?
The original question was find the number of solutions to $2x+y+z=20$ which I calculated to be the coefficient of $x^{20}$ in $(1+x^2+x^4\dots)(1+x+x^2\dots)^2$ which simplified to the term above.
I know $\sum_{k=0}^{20}\binom{k+2}{2}=\binom{23}3$ but the $(-1)^k$ is ruining things.
 A: Given that $(-1)^k=1$ for even $k$, and $-1$ for odd $k$, I'd suggest splitting your sum into $$\sum_{n=0}^{10}{\binom{2n+2}{2}}-\sum_{n=1}^{10}{\binom{2n+1}{2}}$$
with the former representing even $k$ and the latter for odd $k$.
A: Alternatively:
$$\begin{align}\sum_{k=0}^{20}(-1)^k\binom{k+2}2=&\sum_{k=0}^{20}\binom{k+2}2-2\cdot \sum_{k=0}^{9}\binom{2k+3}2=\\
&{23\choose 3}-\sum_{k=0}^9 (2k+3)(k+1)=\\
&1771-2\cdot 825=121.\end{align}$$
A: There is! You can use the identity $\binom{k+2}2 = \sum_{i=0}^{k+1}i$.
Our sum is $$\sum_{k=0}^n (-1)^k \binom{k+2}{2} = \sum_{k=0}^n (-1)^k \sum_{i=0}^{k+1}i$$
For odd $n$: Letting $m=\frac {n-1}2$ and pairing up the terms we get
$$\begin{align}\sum_{k=0}^n (-1)^k \sum_{i=0}^{k+1}i &= \sum_{j=0}^m [(-1)^{2j}\sum_{i=0}^{2j+1}i + (-1)^{2j+1}\sum_{i=0}^{2j+2}i] \\&=\sum_{j=0}^m [\sum_{i=0}^{2j+1}i -\sum_{i=0}^{2j+2}i] \\&= \sum_{j=0}^m-(2j+2) \\&= -2\sum_{j=0}^m(j+1) \\&= -2\sum_{j=1}^{m+1}j\\ &= -2[\binom{m+2}2-0] \\&= -(m+2)(m+1) \\&=-\frac{(n+3)(n+1)}4
\end{align}$$
For even $n$: $$\begin{align} \sum_{k=0}^n (-1)^k \sum_{i=0}^{k+1}i &= \sum_{k=0}^{n-1} (-1)^k \sum_{i=0}^{k+1}i + \sum_{i=0}^{n+1}i
\\&= -\frac{((n-1)+3)((n-1)+1)}4 + \binom{n+2}2 \\
&=-\frac{n^2+2n}4 + \frac{n^2 + 3n + 2}{2}
\\&= \frac{ - n^2 - 2n + 2n^2 + 6n + 4}4 \\&=(\frac{n+2}2)^2
\end{align}$$
A: Using the identity from Pascal's Triangle, we get
$$
\begin{align}
\sum_{k=0}^n(-1)^k\binom{k+a}{b}
&=\sum_{k=0}^n(-1)^k\left[\binom{k+a+1}{b}-\binom{k+a}{b-1}\right]\\
&=\sum_{k=1}^{n+1}(-1)^{k-1}\left[\binom{k+a}{b}-\binom{k+a-1}{b-1}\right]\\
&=\frac12\left(\binom{a}{b}+(-1)^n\binom{n+a+1}{b}-\sum_{k=1}^{n+1}(-1)^{k-1}\binom{k+a-1}{b-1}\right)\\
&=\frac12\left(\binom{a}{b}+(-1)^n\binom{n+a+1}{b}-\sum_{k=0}^n(-1)^k\binom{k+a}{b-1}\right)\tag1
\end{align}
$$
Multiplying by $(-2)^b$, we get
$$
\begin{align}
(-2)^b\sum_{k=0}^n(-1)^k\binom{k+a}{b}
&=\frac12(-2)^b\left[\binom{a}{b}+(-1)^n\binom{n+a+1}{b}\right]\\
&+(-2)^{b-1}\sum_{k=0}^n(-1)^k\binom{k+a}{b-1}\\
&=\frac12\sum_{j=1}^b(-2)^j\binom{a}{j}+\frac{(-1)^n}2\sum_{j=1}^b(-2)^j\binom{n+a+1}{j}\\
&+[n\equiv0\bmod2]\\
&=\bbox[5px,border:2px solid #C0A000]{\frac12\sum_{j=0}^b(-2)^j\binom{a}{j}+\frac{(-1)^n}2\sum_{j=0}^b(-2)^j\binom{n+a+1}{j}}\tag2
\end{align}
$$
Setting $a=b=2$ yields
$$
\begin{align}
\sum_{k=0}^n(-1)^k\binom{k+2}{2}
&=\frac18\left[\binom{2}{0}-2\binom{2}{1}+4\binom{2}{2}\right]\\
&+\frac{(-1)^n}8\left[\binom{n+3}{0}-2\binom{n+3}{1}+4\binom{n+3}{2}\right]\\[6pt]
&=\frac18+\frac{(-1)^n}8\left(2n^2+8n+7\right)\tag3
\end{align}
$$
Setting $n=20$ yields
$$
\begin{align}
\sum_{k=0}^{20}(-1)^k\binom{k+2}{2}
&=\frac18+\frac{(-1)^{20}}8\left(2\cdot20^2+8\cdot20+7\right)\\[6pt]
&=121\tag4
\end{align}
$$
A: $$\sum\limits_{k=0}^{20}(-1)^k\binom{k+2}2 = \binom{2}{2} \underbrace{-\binom{3}{2} + \binom{4}{2}}_{\binom{3}{1}} \underbrace{-\binom{5}{2} + \binom{6}{2}}_{\binom{5}{1}}- \ldots \underbrace{-\binom{21}{2} + \binom{22}{2}}_{\binom{21}{1}}$$
$$ = 1 + 3 + 5 + \ldots + 21 = 121$$
