Find the coefficient of $x^2$ in the expansion of $$\underbrace{\left(\left(\left(\left(x-2\right)^2 -2\right)^2 -2\right)^2 -\cdots -2\right)^2}\_{k\;\text{times}}$$I tried to equate it to a polynomial of the form $$\underbrace{P\_k x^3}\_{\text{Terms of power}\geq3} + \underbrace{B\_kx^2}\_{\text{Terms of power=2}} + \underbrace{A\_k x} \_{\text{Terms of power=1}} +C$$So we can write$$\underbrace{\left(\left(\left(\left(x-2\right)^2 -2\right)^2 -2\right)^2 -\cdots -2\right)^2}\_{k\;\text{times}} = P\_k x^3 + B\_kx^2 + A\_k x +C$$ We can find $C$ easily if we simply set $x=0$ in the original equation and we get, $$\underbrace{\left(\left(\left(\left(0-2\right)^2 -2\right)^2 -2\right)^2 -\cdots -2\right)^2}\_{k\;\text{times}} = \underbrace{\left(\ldots \left(\left(4-2\right)^2 -2\right)^2-\cdots-\cdots 2\right)^2}\_{k-1 \;\text{times}}$$ Simplifying till the end we get, $$C=4$$ So we get, $$\underbrace{\left(\left(\left(\left(x-2\right)^2 -2\right)^2 -2\right)^2 -\ldots -2\right)^2}\_{k\;\text{times}} = P\_k x^3 + B\_kx^2 + A\_k x +4$$ Not sure where to go from here.  

**EDIT:** 
I think I have found a solution to develop the recursion, please tell me if it is right.  

$$P\_k x^3 +B\_kx^2 + A\_k x +C=\underbrace{\left(\left(\left(\left(x-2\right)^2 -2\right)^2 -2\right)^2 -\cdots -2\right)^2}\_{k\;\text{times}}$$ Now, we can also write it as 
$$P\_k x^3 +B\_kx^2 + A\_k x +C=\left[\underbrace{\left(\ldots \left(\left(x-2\right)^2-2\right)^2 \ldots -2\right)^2}\_{k-1\;\text{times}} -2\right]^2$$ 
Which is  

$$P\_k x^3 +B\_kx^2 + A\_k x +C=\left[\left(P\_{k-1}x^3 + B\_{k-1}x^2 + A\_{k-1} x+ 4\right)-2\right]^2$$
$$P\_k x^3 +B\_kx^2 + A\_k x +C=\left(P\_{k-1}x^3 + B\_{k-1}x^2 + A\_{k-1} x+ 2\right)^2$$
So, we get, $$P\_k x^3 +B\_kx^2 + A\_k x +C=\left(P^2\_{k-1}x^6+ 2P\_{k-1}B{k-1}x^5 + \left(2P\_{k-1}A\_{k-1}B^2\_{k-1}\right)x^4 + \left(4P\_{k-1} + 2B{k-1}A{k-1}\right)x^3 + + \left(4B\_{k-1} + A^2\_{k-1}\right)x^2 + 4A\_{k-1}x + 4\right)$$ 
Thus, we get, $$A\_k = 4A\_{k-1}$$ And, $$B\_k = A^2\_{k-1} + 4B\_{k-1}$$ Since $\left(x-2\right)^2 = x^2 - 4x + 4$ we have $A\_1 = -4$ and similarly $A\_2 = -4\cdot4=-4^2$ and in general $$A\_k=-4^k$$ Now, we can use the relation we have for $B\_k = A^2\_{k-1} + 4B\_{k-1}$ Writing this as $$B\_k = A^2 \_{k-1} + 4B\_{k-1} = Ak^2 \_{k-1} + 4\left(A^2\_{k-2} + 4B\_{k-2}\right)$$ $$B\_k = A^2\_{k-1} + 4A^2\_{k-2} + 4^2\left(A\_{k-3}^2 + 4B\_{k-3}\right)$$ So, $$B\_k = A^2\_{k-1} + 4A^2\_{k-2} + 4^2A^2\_{k-3} + \ldots 4^{k-2}A\_1^2 + 4^{k-1}B\_1$$ Then we can substitute, $B\_1 = 1, A\_1 = 4, A\_2 = -4^2, A\_3 = -4^3, \ldots A\_{k-1}= -4^{k-1}$ We get, $$B\_k = 4^{2k-2} + 4\cdot4^{2k-4} + 4^2\cdot4^{2k-6} + \ldots + 4^{k-2}\cdot4^2 + 4^{k-1}\cdot 1$$ $$B\_k = 4^{2k-2} + 4^{2k-3} + 4^{2k-4} + \ldots 4^{k+1} + 4^k + 4^{k-1}$$ $$B\_k = 4^{k-1}\left(1 + 4+4^2+4^3 + \ldots 4^{k-2} + 4^{k-1}\right)$$
$$B\_k = 4^{k-1} \cdot \frac{4^k - 1}{4-1} = \frac{4^{2k-1} - 4^{k-1}}{3}$$ 
This is how I have solved it but I am wondering if there is a nicer solution.