Finding number of non negative integral solutions of $a+2b+3c+4d=20$ How to find out the number of non negative integral solutions of an equation containing 4 variables, for eg, say, ${a+2b+3c+4d=20}$?
I mean, we can calculate it quite easily for equations containing 2 variables, but what about equations containing 4 variables.?

See, that $d\leq 5$, $c\leq \left\lceil \frac{20-4d}{3}\right\rceil $, $a$ and $b$ can be then obtained in $n_{d,c}=\left\lceil\frac{20-4d-3c+1}{2}\right\rceil $ ways.


*

*$d=5$


*

*$c=0$ : $n_{5,0}=1$ ($[0,0,0,5]$)


*$d=4$


*

*$c=0$ : $n_{4,0} =3$ ($[0,2,0,4]$, $[2,1,0,4]$, $[4,0,0,4]$)

*$c=1$ : $n_{4,1} =1$ ($[1,0,1,4]$)


*$d=3$


*

*$c=0$ : $n_{3,0} =5$ 

*$c=1$ : $n_{3,1} =3$ 

*$c=2$ : $n_{3,2} =2$ 


*$d=2$


*

*$c=0$ : $n_{2,0} =7$ 

*$c=1$ : $n_{2,1} =5$ 

*$c=2$ : $n_{2,2} =4$ 

*$c=3$ : $n_{2,3} =2$ 

*$c=4$ : $n_{2,4} =1$ 


*$d=1$


*

*$c=0$ : $n_{1,0} =9$ 

*$c=1$ : $n_{1,1} =7$ 

*$c=2$ : $n_{1,2} =6$ 

*$c=3$ : $n_{1,3} =4$ 

*$c=4$ : $n_{1,4} =3$ 

*$c=5$ : $n_{1,5} =1$ 


*$d=0$


*

*$c=0$ : $n_{0,0} =11$ 

*$c=1$ : $n_{0,1} =9$ 

*$c=2$ : $n_{0,2} =8$ 

*$c=3$ : $n_{0,3} =6$ 

*$c=4$ : $n_{0,4} =5$ 

*$c=5$ : $n_{0,5} =3$ 

*$c=6$ : $n_{0,6} =2$ 



The number of ways is then equal to:
$$1+4+10+19+30+44=108$$
