Power values of polynomial

Consider the simplest case where $f(x)=a_0+a_1x$ and $(a_0,a_1)=1$. Then $$y^m=f(f(x)+1)=(a_0+a_1+a_0a_1)+a_1^2x$$ and write $y=a_1^2n+k$ for some integer $k$ such that $(a_1,k)=1$. We obtain $$k^m\equiv a_0+a_1+a_0a_1\pmod{a_1^2}$$ and choosing $m=2$ means that $a_0+a_1+a_0a_1$ is a quadratic residue of $a_1^2$. This means that $$\left(\frac{a_0+a_1+a_0a_1}{a_1^2}\right)=\left(\frac{a_1+1}{a_1^2}\right)\left(\frac{a_0+a_1}{a_1^2}\right)=1$$ using Legendre symbol notation. We can evaluate the first term as follows $$\left(\frac{a_1+1}{a_1^2}\right)=\begin{align}\begin{cases}1&\text{if}\,a_1\,\text{is odd or}\, \sqrt{a_1+1}\,\text{is an integer}\\-1&\text{otherwise}\end{cases}\end{align}$$ by noting that $(a_1^2-a_1-2)^2/4\equiv a_1+1\pmod{a_1^2}$ when $a_1$ is odd.

In the first case, choosing $a_0=a_1^2-3a_1+1$ suffices for all $a_1>3$ as $a_0+a_1$ is a perfect square and $(a_0,a_1)=1$. This is enough to generate not one, but two infinite sets of solutions.

For this value of $a_0$, the congruence $k^m\equiv a_0+a_1+a_0a_1\pmod{a_1^2}$ reduces to $$k^2\equiv-a_1+1\pmod{a_1^2}\implies k=\frac{a_1^2\pm(a_1-2)}2$$ after removing higher-order terms.

As the "generating" function is $f(x)=r^2-3r+1+r^2x$ on replacing $r:=a_1$, substituting this back into $y^2=f(f(x)+1)$ yields the two families $$(x,y)=\left(r^2n^2+(r^2\pm(r-2))n+\frac{(r-1)^2}2\pm(r-2),r^2n+\frac{r^2\pm(r-2)}2\right)$$ for all positive integers $n$ and odd $r\ge5$.

One can obtain further solution sets by choosing $a_0=a_1^2-(2c+1)a_1+c^2$ for a positive integer $c>1$ provided that $(a_0,a_1)=1$ and then repeating the process above.


I have found a polynomial without any solutions. Let $n=1$ and

$$f(x)=2+4x$$

Then

$$f(f(r)+1)=2(7+8r)=y^m$$

This implies $y$ is even. But then $y=2k$ gives

$$2^m k^m=2(7+8r)$$

$$2^{m-1}k^m=7+8r$$

The left side is always even (since $m\geq 2$) while the right side is always odd. We conclude there is no $y$ and $m\geq 2$ which solves the exponential diophantine equation.

However, there is still a lot of interesting stuff that might be done with this problem. I think that in general, adding the condition that

$$\gcd(a_0,a_1,...,a_n)=1$$

might succeed in guaranteeing a solution. However, I have not proved this. For example, the same sort of problem arises when you consider the following polynomials

$$f(x)=2+2x+2x^2$$

$$f(x)=2+2x+2x^2+4x^3$$

$$f(x)=2+2x+2x^2+2x^3+2x^4$$

$$\vdots$$