I did (parcially) the following exercise:
There are $10$ identical gift boxes. Each one must be colored with a unique color and there are the colors red, blue, green and yellow. It's possible to color a maximum of $2$ boxes with red, and a maximum of $3$ colors with blue. Write the ordinary generating function associated with the problem and find the number of ways to color 10 boxes.
I've managed to find the generating function:
$$(1+x+x^2)(1+x+x^2+x^3)(1+x+x^2+\dots)^2=\left[ \frac{1-x^3}{1-x}\right]\left[ \frac{1-x^4}{1-x}\right]\left[ \frac{1}{1-x}\right]^2\\ \frac{(1-x^3)(1-x^4)}{(1-x)^4}$$
But for calculating the number of colored boxes, I'd have:
$$\frac{(1-x^3)(1-x^4)}{(1-x)^4}=[1-x^3][1-x^4] \left[ \frac{1}{(1-x)} \right]^4$$
The expansion of $\left[\frac{1}{(1-x)}\right]^4$ is:
$$\left[\frac{1}{(1-x)}\right]^4=\sum_{j=0}^\infty {4+j-1 \choose j} y^k$$
But this doesn't seem too revealing. I don't know how to proceeed the counting in this exercise.
Already you have notice that$$(1+x+x^2)(1+x+x^2+x^3)(1+x+x^2+\dots)^2=\left[ \frac{1-x^3}{1-x}\right]\left[ \frac{1-x^4}{1-x}\right]\left[ \frac{1}{1-x}\right]^2.$$ Also $$(1+x+x^2+\dots)^2=(1+2x+3x^2+\cdots+kx^{k-1}+\cdots)$$ $$(1+x+x^2)(1+x+x^2+x^3)=(1+2x+3x^2+3x^3+2x^4+x^5)$$ Therefore coefficient of $x^{10}$ in the product $$(1+2x+3x^2+3x^3+2x^4+x^5)(1+2x+3x^2+\cdots+kx^{k-1}+\cdots)$$ is $$11+(2\times10)+(3\times9)+(3\times8)+(2\times7)+6=102.$$