1

How to solve $p^2 - p + 1 = q^3$ over primes?

I checked that $p$ and $q$ must be odd and I don't know what to do next. I don't have any experience with such equations.

Xam
  • 6,338
user4201961
  • 1,637
  • 11
  • 25

1 Answers1

1

COMMENT.-Primes $p$ of the form $6x-1$ cannot be solution: in fact $$(6x-1)^2-(6x-1)+1=36x^2-18x+3=3(12x^2-6x+1)$$ so $q=3$ which is not compatible with $12x^2-6x+1=3^2$.

It follows $p$ must be of the form $6x+1$ so we have $$(6x+1)^2-(6x+1)+1=36x^2+6x+1=q^3$$ Solving the equation, where $X=6x$, $$X^2+X+1-q^3=0$$ we have $$2X=-1+\sqrt{4q^3-3}$$ and the equation $$4q^3-3=z^2$$ seems to have $(z,q)=(37,7)$ as only solution which gives $\boxed{(p,q)=(19,7)}$.

Is it $(p,q)=(19,7)$ the only solution?

Ataulfo
  • 32,657
  • FWIW: $q \not \equiv 3 \bmod 3 \Rightarrow q^3 \equiv \pm 1 \bmod 9$. But $p^2-p+1 \not \equiv \pm 1 \bmod 9$ unless $p\equiv 1 \bmod 9$. Also $q \not \equiv 0 \bmod 7 \Rightarrow q^3 \equiv \pm 1 \bmod 7$. But $p^2-p+1 \not \equiv \pm 1 \bmod 7$ unless $p\equiv (0,1,4) \bmod 7$. $p\equiv 0 \bmod 7 \Rightarrow p=7$, which is not a solution. Thus, any solutions other than $p=19, q=7$, if they exist, will have the form $109+126k$ or $127+126k$. A quick check yields no further easy solutions. – Keith Backman Jun 07 '22 at 18:02