<s>[INST] Binomial Theorem with Three Terms $(x^2 + 2 + \frac{1}{x} )^7$
Find the coefficient of $x^8$
Ive tried to combine the $x$ terms and then use the general term of the binomial theorem twice but this does seem to be working.
Does anyone have a method of solving this questions and others similar efficiently?
Thanks.
 [/INST] The answer is 301.
Just trust your plan of the twofold use of the binomial formula:
First step
$$\left((x^2+2)+\frac{1}{x}\right)^7=\sum _{k=0}^7 \binom{7}{k} \left(x^2+2\right)^k x^{k-7}$$
Second step
$$\left(x^2+2\right)^k=\sum _{m=0}^k 2^{k-m} x^{2 m} \binom{k}{m}$$
Hence you get a double sum in which the power of $x$ is $2m+k-7$, setting this equal to $8$ we get $k = 15-2m$. This leaves this single sum over $m$
$$\sum _{m=0}^7 2^{15-3 m} \binom{7}{15-2 m} \binom{15-2 m}{m}$$
Since, for $n, m = 0,1,2,...$ the binomial coefficient $\binom{n}{m}$ is zero unless $n\ge m$ we find $7\ge 15-2m \to m \ge 4$ and $15-2m\ge m \to m\le 5$. Hence only the terms with $m=4$ and $m=5$ contribute to the sum giving $280$ and $31$, respectively, the sum of which is $301$.
</s>