<s>[INST] Finding a coefficient of $x^{57}$ in a polynomial $(x^2+x^7+x^9)^{20}$ So the task is to find a coefficient of $x^{57}$ in a polynomial $(x^2+x^7+x^9)^{20}$
I was wondering if there is a more intelligible and less exhausting strategy in finding the coefficient, other than saying that $(x^2+x^7+x^9)^{20}=((x^2+x^7)+x^9)^{20}$ and then working with binomial expansion.
 [/INST] $$
\begin{align}
\left[x^{57}\right]\left(x^2+x^7+x^9\right)^{20}
&=\left[x^{57}\right]\sum_{\substack{a+b+c=20\\a,b,c\ge0}}\frac{20!}{a!\,b!\,c!}x^{2a+7b+9c}\tag1\\
&=\sum_{\substack{2a+7b+9c=57\\a+b+c=20\\a,b,c\ge0}}\frac{20!}{a!\,b!\,c!}\tag2\\
&=\sum_{\substack{5b+7c=17\\b,c\ge0}}\frac{20!}{(20-b-c)!\,b!\,c!}\tag3\\[3pt]
&=\frac{20!}{(20-2-1)!\,2!\,1!}\tag4\\[15pt]
&=3420\tag5
\end{align}
$$
Explanation:
$(1)$: apply the Multinomial Theorem
$(2)$: extract the coefficient of $x^{57}$
$(3)$: substitute $a=20-b-c$
$(4)$: the only non-negative solution to $5b+7c=17$ is $(b,c)=(2,1)$
$(5)$: evaluate
</s>