<s>[INST] How many solutions are there to the equation $x_1 + x_2 + x_3 + x_4 + x_5 = 21$, Question
How many solutions are there to the equation
$x_1 + x_2 + x_3 + x_4 + x_5 = 21$,
such that
all of $x_{i}$ where $i=1,2,3,4,5$ are non negative
and
$0\leq x_1 \leq 3$
$1\leq x_2 \lt 4$
and
$x_3 \geq 15$
Attempt
first used $0\leq x_1 \leq 3$ and
$1\leq x_2 \lt 4$ and then find the number of solutions
violating $0\leq x_1 \leq 3$ $\\,\,$and$\,\,$$1\leq x_2 \lt 4$
will give $x_1 \gt 3$$\\,\,$and$\,\, x_2 \gt 3$
Now number of  solutions are there to the equation
$x_1 + x_2 + x_3 + x_4 + x_5 = 21$,
=$\binom{21+5-1}{21}=12,650$
Now number of  solutions are there to the equation
$x_1 + x_2 + x_3 + x_4 + x_5 = 21$, such that  $0\leq x_1 \leq 3$ and $1\leq x_2 \lt 4$
=$12650-$number of  solutions are there to the equation
$x_1 \gt 3$$\\,\,$and$\,\, x_2 \gt 3$
$-----------------------------------------------$
solving number of equation for  $x_1 \gt 3$$\\,\,$and$\,\, x_2 \gt 3$
let $x_1=x_1^{'}+3$
$x_2=x_2^{'}+3$
our equation becomes
$x_1^{'}+3+x_2^{'}+3+x_3+x_4+x_5=21$
$\Rightarrow x_1^{'}+x_2^{'}+x_3+x_4+x_5=15$
$\therefore $ number of equation=
$\binom{15+5-1}{15}=3876$
Now,
Now number of  solutions are there to the equation
$x_1 + x_2 + x_3 + x_4 + x_5 = 21$, such that  $0\leq x_1 \leq 3$ and $1\leq x_2 \lt 4$
=$12650-3876=8,774$
now among $8,774$ we have to find $x3 \geq 15$
for $x_3 \geq 15$,
let $x_3 =x_3 ^{'}+15$
our equation becomes
$x_1 + x_2 + x_3^{'} +15+ x_4 + x_5 = 21$,
$x_1 + x_2 + x_3 + x_4 + x_5 = 6$
$\therefore$ number of equation =$\binom{6+5-1}{6}=210$
so final  answer$=8,774-210=8,564$
But the answer is $106$
Where am i wrong??
Please correct me or else give me the correct way
Thanks!
,
 [/INST] see this answer for more explanations on the method
The answer is the coefficient of $x^{21}$ in
$$(1+x+x^2+x^3)(x+x^2+x^3)(1+x+x^2+\ldots)^3$$ which is the same as the coefficient of $x^{21}$ in
$$x(1-x^4)^2(1-x)^{-5}= x(1-2x^4 +x^8)\sum_{k=0}^\infty \binom{4+k}{k}x^k$$
which can be read off as 
$$\binom{24}{20} -2\binom{20}{16} + \binom{17}{12}$$
</s>