Number of elements in set $S = \{(x,y,z): x,y,z \in \mathbb{Z}, x+2y+3z=42, x,y,z \ge 0\}$ is?
My solution:
This is equal to the coefficient of $t^{42}$ in
$(1+t+t^2+t^3+...+t^{43})(1+t^2+t^4+...+t^{42})(1+t^3+t^6+...+t^{42})$
= $\frac{(1-t^{43})}{1-t} \times \frac{(1-t^{44})}{1-t^2} \times \frac{(1-t^{45})}{1-t^3} $
= $\frac{1} {(1-t)(1-t^2)(1-t^3)}$
since I neglected higher powers of t
= $\frac{1} {(1-t)^3(1+t)(1+t+t^2)}$
= $\frac{(1-t)^{-3}} {(1+t)(1+t+t^2)}$
Now I know the coefficient of $x^n$ in $(1-x)^{-r}$ is $\binom {n+r-1}{r-1}$.
But I don't know what to do with the denominator part. Can someone help??
Let $$A=\frac{1} {(1-t)(1-t^2)(1-t^3)}$$ Then we can say that $$A=(1-t)^{-1}(1-t^2)^{-1}(1-t^3)^{-1}$$ and it is well known that for $\displaystyle{(1-x)^{-n}=1+\binom{n}{1}x+\binom{n+1}{2}x^2 +\binom{n+2}{3}x^3+\cdots\textrm{till}\:\: \infty}$
where $n$ is a positive integer. I hope you can continue from here.