<s>[INST] Find the coefficient of $x^{10}$ We have been given the following function.
$f(x)$= $x$  +$x^2$ + $x^4$ + $x^8$ + $x^{16}$ + $x^{32}$ + ...upto infinite terms 
The question is as follows:
What is the coefficient of $x^{10}$ in $f(f(x))$?
I tried solving it myself and I found the answer too but the method of solving was too much time-consuming.
I had solved it manually by only considering the first four terms of $f(f(x))$. This method took me about 10 minutes.
But the problem is that this question was asked in a competitive exam called JEE which requires solving the question in max. 3-4 minutes.
So, I wanted to know if there was a faster method to solve this problem.
Thanks in advance.   
 [/INST] $f(x)$ contains no tenth power.
$f^2(x)$ has $x^2\cdot x^8$, with a coefficient $2$.
$f^4(x)$ has $x\cdot x\cdot x^4\cdot x^4$ with a coefficient $\dfrac{4!}{2!2!}=6$  and $x^2\cdot x^2\cdot x^2\cdot x^4$ with a coefficient $\dfrac{4!}{3!1!}=4$.
$f^8(x)$ has $x\cdot x\cdot x\cdot x\cdot x\cdot x\cdot x^2\cdot x^2$ appearing $\dfrac{8!}{6!2!}=28$ times.
Total $40.$

Using a CAS,
$$\cdots+40x^{10}+22x^9+16x^8+8x^7+8x^6+6x^5+3x^4+2x^3+2x^2+x$$
</s>