Use a generating function to find the number of ways to distribute 40 jelly beans among ten children if three of the children get an even number of jelly beans.
So I believe the generating function to be: $$ (1 + x^2 + x^4 + x^6 + \ldots)^3(1 + x^2 + x^3 + x^4 + \ldots)^7 $$
and by using infinite series: $$ \frac1{\left(1-x^2\right)^3}\ \frac1{\left(1-x\right)^7}\ $$
...which means I need to find the coefficients that give $x^{40}$, which there are around twenty of (1 * 46C40 + 3C1 * 44C38 + 4C2 * 42C36 + ...)? Is this correct, or is there an easier way to do this?
Write it as $\frac1{(1+x)^3(1-x)^{10}}$ and use the generalized binomial theorem on each term.