What are the positive integer solutions to $x^2-x+1 = y^3$?

The only solutions that I know of till now are $(x,y) = (1,1) \space , (19,7)$. We can note that: $$x^2-x+1 = y^3 \implies (2x-1)^2 = 4y^3-3$$ Thus, if odd prime $p \mid y$, then $(2x-1)^2 \equiv -3 \pmod{p}$ and thus, $-3$ is a quadratic residue. This implies that $p \equiv 1 \pmod{6}$ .

How can we further proceed into this problem?

Note: As mentioned in one of the links in the comments, if we instead replace $x$ by $x+1$, we get $x^2+x+1 = y^3$. Thus, the solutions for this is $(x,y) = (0,1) \space, (18,7)$.


Solution 1:

Theorem. The diophantine equation $$ X^2+3=4Y^3 $$ has only the solutions $(X,Y) = (\pm 1,1), (\pm 37,7)$.

Proof. From this reference.


Adapting to this theorem, we rewrite as $$ (2x-1)^2+3 = 4y^3 $$ Then the solutions are $(2x-1,y) = (\pm 1,1),(\pm 37,7)$. Therefore $$ (x,y) \in \{(0,1),(1,1),(-18,7),(19,7)\} $$


Algebraic Number Theory proof

We shall use some Algebraic Number Theory to show that

Proposition. Let $x,y$ be integers such that $$x^2-x+1 = y^3$$ Then $x$ is a polynomial in $u,v$ such that $$u^3+3u^2v-v^3=-1,\quad x = \frac{1}{2}(1 + u^3 - 3 u^2 v - 6 u v^2 - v^3)$$ or $$u^3-3uv^2-v^3=-1,\quad x = \frac{1}{2}(1 - u^3 - 6 u^2 v - 3 u v^2 + v^3)$$

It is straightforward to see that solutions of equation 1 and 2 are bijective: $$ (u,v) \longleftrightarrow (-v,-u) $$ So the main difficulty lies in solving the first cubic Thue equation $$ u^3+3u^2v-v^3=-1 $$ In particular we know that there are only finitely many solutions and they are all below a certain bound: $|u|,|v| < B$. So a (smart) search suffices if we know $B$.

Unfortunately I was unable to find any elementary solutions, nor was I able to find a way to compute $B$ by pen and pencil.

Remark: This is a known Thue equation that is already solved in a few papers, say both in the reference paper earlier, or as in here. All the solutions look rather advanced/involved. More explicitly,

Theorem. The only integer solutions to $$ x^3-3xy^2-y^3=1 $$ are $$ (1,0), (0,-1), (-1,1), (1,-3), (-3,2), (2,1) $$


We now derive the proposition.

Proof. Let $K$ be the number field $\mathbb Q(\sqrt{-3})$. Letting $w=(1+\sqrt{-3})/2$, the ring of integers is $\mathcal O_K = \mathbb Z[w]$ and the units are $U = \{\pm 1,\pm w,\pm w^2\}$. $K$ has class number $1$ and hence unique factorization.

Now we solve the problem in $\mathcal O_K$: $$ (x-w)(x+w-1) = y^3 $$ Since $$ (x+w-1)-(x-w) = 2w-1 = \sqrt{-3} $$ and $\sqrt{-3}$ is prime (since it has prime norm $3$), either $x-w$ and $x+w-1$ are relatively prime or they share a common prime factor $\sqrt{-3}$.

For the latter case, since $\sqrt{-3}$ has norm $3$, we require norm $N(x-w)$ to be divisible by $3$. This gives $$ N(x-w) = N(\frac{2x-1-\sqrt{-3}}{2})=\frac{(2x-1)^2+3}{4} \equiv 0\pmod 3 $$ so $(2x-1)\equiv 0\pmod 3$. From $$ (2x-1)^2+3 = 4y^2, $$ we get $y\equiv 0\pmod 3$. Now taking $\pmod 9$ we get a contradiction: $$ (2x-1)^2+3 = 4y^2 \implies 3 \equiv 0 \pmod 9 $$ Therefore $x+w-1$ and $x-w$ are coprime.


Since $x-w$ and $x+w-1$ are relatively prime, we must have $$ \begin{align} x-w &= \mu (u+v w)^3\\ x+w-1 &= \mu^{-1} (s+tw)^3 \end{align} $$ for some unit $\mu \in U$ and integers $u,v,s,t$. By absorbing the negative sign into the cube, we may assume $\mu\in\{1,w,w^2\}$.

If $\mu=1$, equation 1 becomes $$ 0 = \frac{1 + 3 u^2 v + 3 u v^2}{2} \sqrt{-3} + \frac{1 + 2 u^3 + 3 u^2 v - 3 u v^2 - 2 v^3 - 2 x}{2} $$ This requires $1+3u^2v + 3uv^2=0$, which is not possible (check $\pmod 3$).

For the other two cases, $\mu = w$ and $\mu=w^2$, checking the coefficient of $\sqrt{-3}$ for $x-w=\mu(u+vw)^3$ gives us the two respective equations: $$ \begin{align} u^3 + 3 u^2 v - v^3 &= -1\\ u^3 - 3 u v^2 - v^3 &= -1 \end{align} $$ This gives the first part of the proposition. Checking the coefficient of the constants will give the other part containing $x$.

$$\tag*{$\square$}$$


Computer solution of the Thue equations

We can solve the first using the online PARI/GP with command:

thue(thueinit(u^3 + 3*u^2 - 1,1),-1)

giving us the solutions $$ (u,v) = (-3, 1), (-1, 0), (0, 1), (1, -1), (1, 2), (2, -3) $$ Then putting in back $u,v$ into $x-w=w(u+v w)^3$ we get $$ x = -18,0,0,0,-18,-18 $$ corresponding to $(x,y) = (-18,7),(0,1)$.

For the other case, the command

thue(thueinit(u^3 + 3*u^2 - 1,1),-1)

gives solutions $$ (u,v) = (-2, -1), (-1, 0), (-1, 3), (0, 1), (1, -1), (3, -2) $$ and solving $x-w=w^2(u+vw)^3$ gives $$ x = 19,1,19,1,1,19 $$ corresponding to $(x,y) = (19,7), (1,1)$.