How many solutions are there to the sum $x+y+z+w = 12$ when $x \geq 4$ and $y \leq 3$? I am currently trying to work out how many integer solutions there are to the sum 
$$x+y+z+w = 12$$
when $x \geq 4$ and $y \leq 3$ (and $z,w \geq 0$).
I have worked out that 


*

*With $x,y,z,w \geq 0$ the number of solutions is $455$.

*With $x \geq 4$ and $y,z,w \geq 0$ the number of solutions is $165$.

*With $y \leq 3$ and $x,z,w \geq 0$ the number of solutions is $290$.


but I have been unable to proceed from here. Can anyone help me to deduce the answer to this one?

We wish to solve the equation 
$$x + y + z + w = 12 \tag{1}$$
in the nonnegative integers subject to the restrictions $x \geq 4$ and $y \leq 3$.  
To handle the restriction $x \geq 4$, let $x' = x - 4$.  Then $x'$ is a nonnegative integer.  Substituting $x' + 4$ for $x$ in equation 1 yields
\begin{align*}
x' + 4 + y + z + w & = 12\\
x' + y + z + w & = 8 \tag{2}
\end{align*}
Equation 2 is an equation in the nonnegative integers.  The number of nonnegative integers solutions of equation 2 subject to the restriction $y \leq 3$ is equal to the number of nonnegative integer solutions of equation 1 subject to the restrictions $x \geq 4$, $y \leq 3$.
If we ignore the restriction $y \leq 3$ for the moment, a particular solution of equation 2 corresponds to the placement of three addition signs in a row of eight ones.  For instance, 
$$1 1 1 + 1 1 + + 1 1 1$$
corresponds to  the solution $x' = 3$ ($x = 7$), $y = 2$, $z = 0$, $w = 3$.  The number of such solutions is the number of ways we can select which three of the eleven positions required for eight ones and three addition signs will be filled with addition signs, which is 
$$\binom{8 + 3}{3} = \binom{11}{3}$$
From these, we must subtract those cases in which the restriction $y \leq 3$ is violated.
Suppose $y > 3$.  Then $y' - 4$ is a nonnegative integer.  Substituting $y' + 4$ for $y$ in equation 2 yields
\begin{align*}
x' + y' + 4 + z + w & = 8\\
x' + y' + z + w & = 4 \tag{3}
\end{align*}
Equation 3 is an equation in the nonnegative integers.  Since a particular solution corresponds to the placement of three addition signs in a row of four ones, equation 3 has 
$$\binom{4 + 3}{3} = \binom{7}{3}$$
solutions in the nonnegative integers.  
Thus, the number of solutions of equation 1 in the nonnegative integers that satisfy the restrictions $x \geq 4$ and $y \leq 3$ is 
$$\binom{11}{3} - \binom{7}{3}$$
