Number of solutions of $x_1+2\cdot x_2+2\cdot x_3 = n$ I have to find number of solutions of $x_1+2\cdot x_2+2\cdot x_3 = n$. I guess it would be $[x^n](1+x+x^2 \dots)(1 + x^2 + x^4 \dots)^2$, but how to compute it? I know only that $\frac{1}{1-x} = 1+x+x^2 \dots$.

If $n$ is odd, then $x_1$ must be odd, and if $n$ is even, then $x_1$ must be even. Thus there is an integer $y$ such that $x_1=2y+1$ for former and $x_1=2y$ for latter. Thus
$$
y+x_2+x_3=\frac{n-1}{2}\text{ or }y+x_2+x_3=\frac{n}{2}.
$$
Therefore, the answer is
\begin{align}
\binom{\frac{n+3}{2}}{\frac{n-1}{2}} &= \binom{\frac{n+3}{2}}{2}\\
&=\frac{n+3}{2}\cdot\frac{n+1}{2}\cdot\frac{1}{2}
\end{align}
for odd $n$ and
\begin{align}
\binom{\frac{n+4}{2}}{\frac{n}{2}}&=\binom{\frac{n+4}{2}}{2}\\
&=\frac{n+4}{2}\cdot\frac{n+2}{2}\cdot\frac{1}{2}
\end{align}
for even $n$.
