<s>[INST] Problem solving a word problem using a generating function 
How many ways are there to hand out 24 cookies to 3 children so that they each get an even number, and they each get at least 2 and no more than 10? Use generating functions. 

So the first couple steps are easy.
The coefficient is $x^{24}$
$g(x) = x^6(1+x^2+x^4+x^6+x^8)^3$ or  what I got was $x^6 (1 + (x^2)^1 +...+ (x^2)^4)^3$
now finding the closed formula is where I am having problems 
My answer: using the fact that $\dfrac{1-x^{n+1}}{1- x}$
I get $x^6\left(\dfrac{1-x^9}{1-x}\right)$ which is wrong 
The correct answer: $x^6\left(\dfrac{1-x^{10}}{1-x^2}\right)$
If someone could explain in some detail on how to get the correct formula would be much appreciated. Thanks!
 [/INST] When computing $1+x^2+(x^2)^2+(x^2)^3+(x^2)^4$, the series is in powers of $x^2$ not $x$. So the proper expression is $$1+x^2+(x^2)^2+(x^2)^3+(x^2)^4=\frac{1-(x^2)^5}{1-(x^2)}=\frac{1-x^{10}}{1-x^2}.$$ By contrast, $$\frac{1-x^{9}}{1-x}=1+x^1+x^2+\cdots +x^8$$ which differs from the above series in it has both odd and even powers of $x$.
</s>