I'm interested in functional equation. I've been thinking about the following functional equation: $$f(x^2+1)={f(x)}^2+1\ \ \ \cdots(\star).$$
I found several functions such as $f(x)=x, x^2+1, (x^2+1)^2+1,\cdots$. Then, I got interested the following question:
Find every natural number $n$ such that there exists a $n$-th polynomial which satisfies $(\star).$
Then, I got the following fact:
Fact: There exists a $2^k$-th polynomial which satisfies $(\star)$ for any non-negative integer $k$.
Proof: Let us define $\{f_k(x)\}$ as the following: $$f_0(x)=x, f_{k+1}(x)={f_k(x)}^2+1\ \ \ \cdots(\star\star).$$
Supposing that both $f_0(x)$ and $f_k(x)$ satisfy $(\star)$, then $f_{k+1}(x)$ also satisfies $(\star)$ because $$f_{k+1}(x^2+1)=\{f_k(x^2+1)\}^2+1=\{{f_k(x)}^2+1\}^2+1={f_{k+1}(x)}^2+1.$$
Hence, $\{f_k(x)\}$ satisfy $(\star)$. Since we know that the degree of $f_k(x)$ is $2^k$ inductively from $(\star\star)$, now the proof is completed.
However, I can't prove that there is no other $n$ such that there exists a $n$-th polynomial which satisfies $(\star)$.
Then, here is my question.
Question: Could you show me how to solve the above question?