In how many different ways can eight identical cookies be distributed among three distinct children if each child receives at least two cookies and no more than four cookies?
$x_1 \ ^2$ + $x_2 \ ^2$ + $x_3 \ ^2$ = 8
could be written as -
($x^2$ + $x^3$ + $x^4$)($x^2$ + $x^3$ + $x^4$)($x^2$ + $x^3$ + $x^4$) = $(x^2 +x^3 + x^4)^3$
Now I had to find out coefficient of $x^8$. This was a small problem so I manually calculated it and I got the answer 6, but is there any direct way to find out $a_kx^k$? without any expansion. I know the same problem can be solved using stars and bars method, but I wanted to know if there is any direct way to find coefficient using above method or not.