Find the number of ordered tuples $(x,y,z)$ such that $x,y,z$ are positive integers that satisfy the equation $14x+6y+21z=504$.
My first thought was generating function. Let $$f(z)=(z^{14}+z^{28}+z^{42}+\cdots)(z^6+z^{12}+z^{18}+\cdots)(z^{21}+z^{42}+z^{63}+\cdots)$$ $$=\frac{z^{14}}{1-z^{14}}\cdot \frac{z^{6}}{1-z^{6}}\cdot \frac{z^{21}}{1-z^{21}},$$ then the number of solutions to the desired equation is the coefficient of $z^{504}$ of $f(z)$, or coefficient of $z^{463}$ of $$\frac{1}{1-z^{14}}\cdot \frac{1}{1-z^{6}}\cdot \frac{1}{1-z^{21}},$$ which incidentally happens to be a prime number. But decomposing the function into partial fractions would to unpractical, I don't know if there is an easy way to find coefficient of a prime power.
After attacking the problem with generating functions in failure, I tried to look at the numbers $6=2\cdot 3,14=2\cdot 7, 21=3\cdot 7$ and notice a cyclic structure here but don't know if that's relevant.
solving for $y$ we get $$y=84-4z-2x+\frac{3z-2x}{6}$$ substututing $$t=\frac{3z-2x}{6}$$ then $$x=2z-3t-\frac{z}{2}$$ and substituting $$z=-2s$$ we get $$x=-5s-3t$$ $$y=84+18s+6t$$ where $s,t$ are integers