<s>[INST] How can I distribute 15 pennies (1 cent) and 17 nickels (5 cents)? How can I distribute 15 pennies (1 cent) and 17 nickels (5 cents), between four children, with the following restriction:


*

*A child receives at leat 1 penny and 3 nickels

*The children 2,3 and 4, receive at least 3 pennies but not more than 9 nickels


I developed the following generating function and I would like to know if it is correct.
$f(x)=[(x+x^2+x^3+...)(x^5+x^{10}+x^{15}+...)][(x^3+x^4+x^5+...)(x^5+x^{10}+...+x^{15})]^3$
$f(x)=[x(1+x+x^2+...)x^5(1+x+x^2+...)][x^3(1+x+x^2+...)(x^5+x^{10}+...+x^{45})]^3$
$f(x)=[x(1+x+x^2+...)x^5(1+x+x^2+...)][x^3(1+x+x^2+...)x^5(1+x+...+x^{9})]^3$
$f(x)=[x^6(1+x+x^2+...)^2][x^8(1+x+x^2+...)(1+x+...+x^{9})]^3$
$f(x)=x^6[(1+x+x^2+...)^2]x^{24}[(1+x+x^2+...)(1+x+...+x^{9})]^3$
$f(x)=x^{30}(1+x+x^2+...)^2(1+x+x^2+...)^3[(1+x+...+x^{9})]^3$
$f(x)=x^{30}\frac{1}{(1-x)^5}(\frac{1-x^{10}}{1-x})^3$
Then the answer is the coefficient of $x^{32}$, but I cant find it...
 [/INST] I am getting:
$\left(x+x^2+x^3+x^4+...+x^{15}\right)\left(x^{15}+x^{20}+x^{25}+...+x^{85}\right)$
for the first kid.
$(\left(x^3+x^4+x^5+...+x^{15}\right) \left(x^{15}+x^{20}+x^{25}+...+x^{45}\right))^3$
for the next 3 kids. Then multiply both of them and check the coefficient of $x^{100}$
</s>