The question is to find the number of solutions of $2x+3y+z=19$.
There are posts like this with answers arrived by counting the possibilities. But I decided to approach it in a different way.
My Approach:
I learnt a theorem stating that
The number of integral solutions of $$a_1x_1+a_2x_2+a_3x_3...+a_nx_n=r$$ is the coefficient of $x^r$ in $$(1+{x}^{a_1}+{x}^{2\cdot{a_1}}+...+{x}^{\left \lfloor{\frac{r}{a_1}}\right \rfloor\cdot{a_1}})\cdot(1+{x}^{a_2}+{x}^{2\cdot{a_2}}+...+{x}^{\left \lfloor{\frac{r}{a_2}}\right \rfloor\cdot{a_2}})...(1+{x}^{a_n}+{x}^{2\cdot{a_n}}+...+{x}^{\left \lfloor{\frac{r}{a_n}}\right \rfloor\cdot{a_n}})$$ (I don't know the name of this theorem)
Substituting and reducing the equation, I landed up with finding coefficient of $x^{19}$ in $${\frac{1-x^{20}}{1-x^2}}\cdot{\frac{1-x^{21}}{1-x^3}}\cdot{\frac{1-x^{20}}{1-x}}$$
But, I had no clue of finding that.
My doubts:
- Is there any other relatively elegant way of finding it? (Other than counting or stars and bars - as in here)
- If no, how to solve further to get the answer?
Thanks in advance...