# Generating function for number of integer solutions, no computer

How do you solve a Generating function for the number of integer solutions with no computer?

Use a generating function to solve the number of integer solutions for $$x_1+x_2+x_3=17$$

Where $2\leq x_1 \leq 5, 3\leq x_2 \leq 6, 4\leq x_3 \leq 7$

Now all this takes is doing: $$(t^2+\dots+t^5)(t^3+\dots+t^6)(t^4+\dots+t^7)$$ and looking at the coefficient of $t^{17}$. In the assignments they always asked us to just comute this using Mathematica/Maple/Matlab etc. This is no problem.

But here it is a highly marked (past)final exam question and obviously I won't have a computer.

Is there some method I don't know for solving this by hand, that explains why it is worth so many marks.

Otherwise I can't see why I am not just doing this by hand for a few minutes.

## 2 Answers

In $$(t^2+\dots+t^5)(t^3+\dots+t^6)(t^4+\dots+t^7)$$ you can notice that is $$t^2(1+t+t^2+t^3)\times t^3(1+t+t^2+t^3)\times t^4(1+t+t^2+t^3)=t^9(1+t+t^2+t^3)^3$$ which simplifies a lot the problem as Gerry Myerson answered. Moreover, $$1+t+t^2+t^3=(t+1)(t^2+1)$$ can help.

It's also the coefficient of $t^8$ in $(1+t+t^2+t^3)^3$. $$(1+t+t^2+t^3)^3=(1-t^4)^3(1-t)^{-3}=(1-3t^4+3t^8+\dots)(1+3t+6t^2+10t^3+\dots)$$ where the coefficient of $t^r$ in the last bracket is $t+2\choose2$. It shouldn't be too hard for you to pick out the coefficient of $t^8$ now.