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...
Finally, I figured it out.
From this:
We substitute and get to find 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, any term other than $1$ cannot give $x^{19}$ on multiplying with$\frac{1}{(1-x^2)(1-x^3)(1-x)}$
So, take the numerator as $1$
Now, we multiply and divide the function by $(1+x^3)(1+x^2+x^4)^2(1+x)$ to get$$\frac{(1+x^3)(1+x^2+x^4)^2(1+x)}{(1-x^6)^3}$$
This results in $$\frac{(1+x^3)(1+x^4+x^8+2x^2+2x^4+2x^6)(1+x)}{(1-x^6)^3}$$
Now, we have the following constraints:
Manipulating the numerator, we get the coefficients of $x$ and $x^7$ to be $1$ and $5$ respectively
Now we represent the expression as $$(x+x^7+P)(1-x^6)^{-3}$$
So, $x^{12}$ and $x^{18}$ terms of $(1-x^6)^{-3}$ are required to get $x^{19}$
So, we express the expression as $$5\cdot{4\choose2}(x^{12})(x^7)-{5\choose3}(x)(x^{18}) + Q$$ $$=40x^{19}+Q$$
So, coefficient of $x^{19}$ is $40$