<s>[INST] How many different ordered triples are there such that $a+b+c = 50$ and $a\geq b\geq c\geq 0$? What if $a>b>c>0$? How many different ordered triples are there such that $a+b+c = 50$ and $a\geq b\geq c\geq 0$? What if $a>b>c>0$?
a,b, and c are all integers
I found this question from a textbook, but the author didn't give the answer so I don't know if my answers are correct, can anyone help me with this problem?
My answers:
if $a\geq b\geq c\geq 0$: $221$ possible triples
if $a>b>c>0$: $196$ possible triples
Thanks!
 [/INST] Using generating functions:
First rewrite the problem by using the substitutions
$$d = a-b, \qquad e = b-c, \qquad f = c.$$
so we have $d,e,f \geq 0$ are integers such that $d + 2e + 3f = 50$.
The number of such triplets can be found as the coefficient of $x^{50}$ in the generating function
$$\frac{1}{(1-x)(1-x^2)(1-x^3)}$$
By using partial fractions, we may find,
$$\begin{align*}\frac{1}{(1-x)(1-x^2)(1-x^3)} &= \frac{17x^2-52x+47}{72(1-x)^3} + \frac{1}{8(1+x)} + \frac{1}{3(1-x^3)} - \frac{1}{9(1-x)} \\ &= \frac{17x^2-52x+47}{72}\sum_{n=0}^\infty \binom{n+2}{2}x^n + \frac{1}{8}\sum_{n=0}^\infty (-1)^nx^n + \frac{1}{3}\sum_{n=0}^\infty x^{3n} - \frac{1}{9}\sum_{n=0}^\infty x^n \end{align*}$$
giving an answer of
$$\frac{17}{72}\binom{50}{2} - \frac{52}{72}\binom{51}{2} + \frac{47}{72}\binom{52}{2} + \frac{1}{8} - \frac{1}{9} = 234$$
for the first problem.

For the second problem, you would have $d,e,f > 0$, or by another substitution of $d' = d-1, e'=e-1, f'=f-1$ we'd be counting the number of triples $d',e',f' \geq 0$ such that $d' + 2e' + 3f' = 44$, so it's just the coefficient of $x^{44}$ of the same generating function.  This gives
$$\frac{17}{72}\binom{44}{2} - \frac{52}{72}\binom{45}{2} + \frac{47}{72}\binom{46}{2} + \frac{1}{8} - \frac{1}{9} = 184$$
</s>