Find the number of integer solutions of $x_1 + x_2 + x_3 = 16$, with $x_i \geq 0$, $x_1$ odd, $x_2$ even, $x_3$ prime. Find the number of integer solutions to  $x_1+x_2+x_3=16$, with $x_i \geq 0$, $x_1$ odd, $x_2$ even , $x_3 $ prime.
My attempt:
Is the same as the number of ways to choose $16$ objects from $3$ distinct objects, i.e., $${16+3-1\choose 3-1}={18\choose 2}$$
 A: We need this:
$x_1+x_2+x_3=16$ and $x_1=2k_1+1,~x_2=2k_2,~k_1,k_2\ge0$ and $x_3\in\{2,3,5,7,11,13\}$.  
Since $x_1+x_2$ is odd then $x_3$ should be odd so $x_3\in\{3,5,7,11,13\}$.
Let's find the answer for all $x_3$.  
Note that: $x_1+x_2=n$, has $\left(\binom{n}{2}\right)$, since $n$ is odd then $x_1$ is odd and $x_2$ is even or $x_1$ is even and $x_2$ is odd, then when $x_1$ is even and $x_2$ is odd we will change them, but whit this we are counting 2 times the number of solutions, then there are $\displaystyle\frac{\left(\binom{n}{2}\right)}{2}=\frac{\binom{n+2-1}{2-1}}{2}=\frac{\binom{n+1}{1}}{2}=\frac{\frac{(n+1)!}{1!n!}}{2}=\frac{n+1}{2}$ ways to choose $x_1$ and $x_2$ such that $x_1+x_2=n$ and $x_1$ is odd and $x_2$ is even.
1-) $x_3=3\Rightarrow x_1+x_2=13\Rightarrow$ ways: $\frac{14}{2}=7$.  
2-) $x_3=5\Rightarrow x_1+x_2=11\Rightarrow$ ways: $\frac{12}{2}=6$.  
3-) $x_3=7\Rightarrow x_1+x_2=9\Rightarrow$ ways: $\frac{10}{2}=5$.  
4-) $x_3=11\Rightarrow x_1+x_2=5\Rightarrow$ ways: $\frac{6}{2}=3$.  
5-) $x_3=13\Rightarrow x_1+x_2=3\Rightarrow$ ways: $\frac{4}{2}=2$.  
Then there are $7+6+5+3+2=23$ integer solutions to $x_1+x_2+x_3=16$, with $x_i\ge0,~x_1$ odd, $x_2$ even and $x_3$ prime.
