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.   

Note that we may at any point in our calculation ignore any terms of degree $11$ or higher. Therefore we may also ignore any terms whose inclusion will only lead to degree $11$ or higher terms. We have:
$$
f(f(x)) = (x + x^2 + x^4 + x^8 + \cdots) + (x + x^2 + x^4 + x^8 +\cdots)^2 \\+ (x + x^2 + x^4 + \cdots)^4 + (x + x^2 + \cdots)^8 + \cdots
$$
From here we may look at each of the brackets and simply extract the ones which lead to degree $10$, using the multinomial theorem (basically the binomial theorem) for what it's worth:


*

*$x + x^2 + x^4 + x^8 + \cdots$: no terms

*$(x + x^2 + x^4 + x^8 + \cdots)^2$: we get $2x^2\cdot x^8$

*$(x + x^2 + x^4 + \cdots)^4$: we get $6 (x)^2\cdot (x^4)^2 + 4(x^2)^3\cdot x^4$

*$(x + x^2 + \cdots)^8$: we get $28(x)^6\cdot(x^2)^2$
where I've used brackets to clarify which terms I've picked in each case.
