Number of non negative integer solutions of $x+y+2z=20$

754 Views Asked by At

The number of non negative integer solutions of $x+y+2z=20$ is

Finding coefficient of $x^{20}$ in $$\begin{align} &\left(x^0+x^1+\dots+x^{20}\right)^2\left(x^0+x^1+\dots+x^{10}\right)\\ =&\left(\frac{1-x^{21}}{1-x}\right)^2\left(\frac{1-x^{11}}{1-x}\right)\\ =&\left(1-x^{21}\right)^2(1-x)^{-3}\left(1-x^{11}\right) \end{align}$$

i.e.finding coefficient of $x^{20}$ in $$(1-x)^{-3}-x^{11}(1-x)^{-3}$$

Or, coefficient of $x^{20}$ in $(1-x)^{-3}-$ coefficient of $x^9$ in $(1-x)^{-3}=\binom{22}{20}-\binom{11}{9}=176$

The asnwer is given as $121$. What's my mistake?

EDIT (after seeing @lulu's comment):

Finding coefficient of $x^{20}$ in $$\begin{align} &\left(x^0+x^1+...+x^{20}\right)^2\left(x^0+x^2+...+x^{20}\right)\\ =&\left(\frac{1-x^{21}}{1-x}\right)^2\left(\frac{1-x^{22}}{1-x^2}\right)\\ =&\left(1-x^{21})^2(1-x)^{-2}(1-x^{22})(1-x^2\right)^{-1} \end{align}$$

i.e.finding coefficient of $x^{20}$ in $$(1-x)^{-2}(1-x^2)^{-1}$$

Not able to proceed next.

3

There are 3 best solutions below

0
On BEST ANSWER

Found the mistake. Instead of $\left(x^0+x^1+\dots+x^{10}\right)$, it should have been $\left(x^0+x^2+\dots+x^{20}\right)$

0
On

If $z=0$, there are 21 ways $x+y=20$.

If $z=1$, there are 19 ways $x+y=18$.

$$\vdots\hspace{4in}$$

If $z=9$ there are 3 ways $x+y=2$.

If $z=10$ ther is 1 way $x+y =0.$

$$\begin{aligned}\text{number of ways } &= 1+3+\cdots+ 19+21 \\ &= \sum_{k=1}^{11} (2k-1)\\ &=2\sum_{k=1}^{11}k - 11 \\ &= 2\cdot 66 -11 \\ &= 121.\end{aligned}$$

2
On

Solving another way one has $0\le z \le10$ so we have in total the solutions of $$x+y=20\space\space\text{ for } (x,y,0)\\x+y=18\space\space\text{ for } (x,y,1)\\x+y=16\space\space\text{ for } (x,y,2)\\x+y=14\space\space\text{ for } (x,y,3)\\x+y=12\space\space\text{ for } (x,y,4)\\x+y=10\space\space\text{ for } (x,y,5)\\x+y=8\space\space\text{ for } (x,y,6)\\x+y=6\space\space\text{ for } (x,y,7)\\x+y=4\space\space\text{ for } (x,y,8)\\x+y=2\space\space\text{ for } (x,y,9)\\x+y=0\space\space\text{ for } (x,y,10)$$ Thus we have $$21+19+17+15+\cdots+5+3+1=121$$ solutions.