<s>[INST] Finding out the coeffcient next to $x^2$ in $(\cdots(x-2)^2-2)^2\cdots-2)^2$. In need to find out the coefficient next to $x^2$ in polynomial $(\cdots(x-2)^2-2)^2\cdots-2)^2$, where we nest the expression $(x-2)^2$ n times.
Meaning that for $n=1$ we get $(x-2)^2$, for $n=2$ we get $((x-2)^2-2)^2=(x^2-4x+2)^2$
Which I won't even try to expand, since already I see that no trivial recurrence applies...
 [/INST] After $n$ compositions, the constant term is (clearly?) $4$.
The linear coefficient is $-4$ for $n=1$, and the linear coefficient after $n$ compositions (call it $a_n$) satisfies the recurrence $$a_n=2a_{n-1}(4)$$ so $a_n=-4\cdot8^{n-1}$ where the $4$ is the constant term form the previous composition.
The quadratic coefficient is $1$ for $n=1$ and the quadratic coefficient after $n$ compositions (call it $b_n$) satisfies the recurrence $$b_n=a_{n-1}^2+2b_{n-1}(4)$$ which means $$b_n=2^{6n-8}+8b_{n-1}$$ If we introduce $c_n$ defined by $b_n=2^{6n-8}c_n$, we have
 $$2^{6n-8}c_n=2^{6n-8}+8\cdot2^{6n-14}c_{n-1}$$
 $$c_n=1+\frac18c_{n-1}$$
Now $c_n$ has a nonhomogeneous linear recurrence.
</s>