# Is $x^2+x+1$ ever a perfect power?

Using completing the square and factoring method I could show that the Diophantine equation $x^2+x+1=y^n$, where $x,y$ are odd positive and $n$ is even positive integers, does not have solution, but I could not show that for odd positive $x,y$ and odd $n>1$ the equation does (does not) have solution.

I already asked the above question of some expert and I received good information about such equation, but how it will be if we assume $x,y$ were "odd prime" numbers?

P.S. I already put it here, but did not get some useful suggestion.

• Probably known but hard. Note that if we allow $x$ even (or negative) then $(x,y) = (18,7)$ (or ($-19,7$)) works for $n=3$. Oct 7, 2016 at 19:52
• If $x$ is positive, $t=x^2+x+1$ lies strictly between $x^2$ and $(x+1)^2$ already, so $t$ will not be an even power for any positive value of $x$. There are other properties of $t$ that restrict possible values of y and n, like $t$ is never 0 mod 9 and is divisible only by primes of the form 3 or 6k+1. However, this question is likely to be closed as a duplicate. Gerhard "Look Up Nagell and Ljunggren" Paseman, 2016.10.07. Oct 7, 2016 at 19:55
• @GerhardPaseman Since OP also is assuming that $x$ and $y$ are prime, another easy case is $n=3$. From $x^2+x+1=y^3$ one has $x(x+1)=(y-1)(y^2+y+1)$. So $x|y-1$ or $x|y^2+y+1$. If $x|y-1$, then $x^2+x+1=y^3 \geq (x+1)^3 > x^2+x+1.$ Thus we may assume that $x|y^2+y+1$. But then since $x$ is prime, either $x=3$ (which doesn't work), or $x \equiv 1$ (mod 3), If $x \equiv 1$ (mod 3), then $3|y^3$ and so $3|y$ which contradicts $y$ being prime. I tried to turn this into a proof for the case of general $n$, where we get from primeness of $x$ that $x|y^{n-1} \cdots +y +1$ but I can't get it to work. Oct 2, 2019 at 21:00

Your equation can be rewritten as

$$\frac{x^{3}-1}{x-1} = y^{N}.$$

As Gerhard Paseman commented above, the Diophantine equation

$$\frac{x^{n} − 1}{x-1} = y^{q} \quad x > 1, \quad y>1, \quad n>2 \quad q \geq 2 \quad \mbox{ (*) }$$

was the subject matter of a couple of papers of T. Nagell from the 1920's. Some twenty-odd years later, W. Ljunggren clarified some points in Nagell’s arguments and completed the proof of the following result.

Theorem. Apart from the solutions

$$\frac{3^{5}-1}{3-1}=11^{2}, \quad \frac{7^{4}-1}{7-1}=20^{2}, \quad \frac{18^{3}-1}{18-1} = 7^{3},$$

the equation in $(*)$ has no other solution $(x, y, n, q)$ if either one of the following conditions is satisfied:

1. $q = 2$,
2. $3$ divides $n$,
3. $4$ divides $n$,
4. $q = 3$ and $n$ is not congruent with $5$ modulo $6$.

Clearly enough, this theorem implies that there are only two solutions to the equation you are considering: $(x=1, y=3, N=1)$ and $(x=18, y=7, N=3)$.