# Solving $P(P(X)) = X^n+1$ over the polynomials.

Let $R$ be any unital ring. What are the integers $n>1$ such that there is a polynomial $P(X) \in R[X]$ such that $P(P(X)) = X^n+1$ ?

If this is too general (I didn't even assume my ring to be commutative...), we can focus on the cases $R=\Bbb Z, \Bbb Q, \Bbb R, \Bbb C, \Bbb F_q$.

If we assume that $R$ is an integral domain, then $n = \text{deg}(P)^2$, I think, so we get a nice condition on $n$. Can we tell anything else?

When $R=\Bbb R$, I don't know if we could even find a continuous function $f : \Bbb R \to \Bbb R$ such that $f(f(x)) = x^n+1$ for every $n>1$...

• For the case of the field of real or complex numbers, we can compute the derivative:$P^{\prime}(x)P^{\prime}(P(x))=n x^{n-1}$. So $P^{\prime}(x)$ has to be $u x^m$. – Kelenner Aug 18 '16 at 9:20
• @Kelenner: great idea. We can generalize this if $R[X]$ is a UFD, I think (for instance $R$ is a field). – Alphonse Aug 18 '16 at 9:22
• If $q=p^2$, $p$ a prime, then there exists an element $\alpha\in\Bbb{F}_q$ such that $\alpha^p+\alpha=1$. In that case $P(x)=x^p+\alpha$ yields $$P(P(x))=x^{p^2}+1.$$ If $p$ is odd, then the choice $\alpha=(p+1)/2\in\Bbb{F}_p$ works because $\alpha^p=\alpha$ by Little Fermat. – Jyrki Lahtonen Aug 18 '16 at 20:01
• Over a fielf of characteristic zero I don't think this can happen. If $P(x)=x^n+a_1x^{n-1}+\cdots+a_n$, $n>1$, then $P(P(x))=x^{n^2}+na_1x^{n^2-1}+\cdots$. The degree $n^2-1$ term then forces $a_1=0$. You can then look at the degree $n^2-2$ term et cetera. – Jyrki Lahtonen Aug 18 '16 at 20:16