0

Is it possible to solve the following diophantine equation:

$p^2-p+1=q^3$ for primes $p$ and $q$

This is just a random problem that came to my mind , so it may not have an elemnetary solution , but I would love to know if this can be solved .

John
  • 1,056

3 Answers3

5

Supposing that $q\ge p$ gives $$p^3\le q^3=p^2-p+1\implies (p-1)(p^2+1)\le 0$$ which contradicts that $p\ge 2$.

So, we have to have $q\lt p$.

Having $$(q-1)(q^2+q+1)=p(p-1)$$ gives that $p$ has to divide $q^2+q+1$.

Let $$q^2+q+1=pm\tag1$$ where $m\ge 2$ is a positive integer to have $$(q-1)pm=p(p-1)\implies (q-1)m=p-1\implies p=(q-1)m+1$$ From $(1)$, $$q^2+q+1=m(qm-m+1)$$ $$\implies q^2+q+1=qm^2-m^2+m$$ $$\implies q^2+(1-m^2)q+1+m^2-m=0$$ $$\implies q=\frac{m^2-1\pm\sqrt{m^4-6m^2+4m-3}}{2}$$ Note here that for $m\gt 3$, $$(m^2-3)^2\lt m^4-6m^2+4m-3\lt (m^2-2)^2$$ Therefore, we have to have $m=2,3$.

For $m=2$, $m^4-6m^2+4m-3=-3\lt 0$.

For $m=3$, $m^4-6m^2+4m-3=6^2$ to have $q=1,7$.

So, $(p,q)=(19,7)$ is the only solution.

mathlove
  • 151,597
2

Note \begin{align} p^2-p+1 &= \left(p-\frac{1}{2}\right)^2+\frac{3}{4} \\ \implies \left(p-\frac{1}{2}\right)^2 &= q^3-\frac{3}{4} \\ \iff (2p-1)^2 &= 4q^3-3 \qquad \tag{*} \end{align} The above re-write is equivalent to the discriminant. For an integer solution to exist, the discriminant needs to be a perfect square. The re-write above is no good for this as it is very difficult to work wit the RHS of (*).

Re-writing the original statement again, we find $$p(p-1)=(q-1)(q^2+q+1)$$ Thus prime $p$ divides one of $q-1$ and $q^2+q+1$. It cannot divide $q-1$ since $q^3=p^2-p+1<p^2<p^3$ thus is must divide $q^2+q+1$.

Thus let $$p(p-1)=(q-1)lp$$ since $p>0$ $$p-1=l(q-1)$$ Thus $$p=lq-l+1$$ Hence a quadratic in $q$ can be formed (wlog $q>0$ otherwise the exercise is pointless) $$lp=l^2 q-l^2+l$$ and $$q^2+(1-l^2)q+(l^2-l+1)=0$$ Now, whilst my argument seems circular, be safe in the knowledge that since the quadratic in $q$ above must be true for integer $q$ thus the discriminant is a perfect square. Hence $$\Delta_l=l^4-6l^2+4l-3$$ So the trick here is to find an $l$ such that $\Delta$ is a perfect square. If $l=3$ then $\Delta=36$ a square so what if $l >3$?

Note that $$(l^2-3) = l^4-6l^2+9$$ Which implies that if we choose any other value than $l=3$ we cannot get a perfect square. If we do set $l=3$ then $$q^2-8q+7=0$$ From whcih $q=(1,7)$ since $1$ is not prime we are left with the condition that for $q=7, 3p = q^2+q+1 = 57$ thus only solutions are $(p, q)=(19,7)$

  • I reached up till the same point as you, until I was wondering why the only value of $l$ yielding a perfect square is $3$. I mean, some other value of $l$ could also work, right?(Then I abandoned my answer). I did not get the logic at that point. I am sure it will be correct, but can you explain why once again? – Sarvesh Ravichandran Iyer Nov 15 '16 at 11:52
  • Well my thoughts on this are in the comparison to $(l^2-3)^2$ and $\Delta$. the next perfect square on is $(l^2-2)^2$ but this far too big for inequality. I think our discriminant has to get ahead of $(l^2-3)^2$. Thus I think I have shown that $(l^2-3)^2$ is a perfect square for $l=3$ only. –  Nov 15 '16 at 12:01
  • 1
    I think I can see what you are saying. Thank you for the clarification. – Sarvesh Ravichandran Iyer Nov 15 '16 at 12:02
1

$(p,q)=(19,7)$ is the only solution. Drop the requirement for p and q to be prime for now. $$x^2-x+1=y^3$$ Let $t+1=x$, $$(t+1)^2-(t+1)+1=t^2+t+1=y^3$$ This is an equation investigated by T. Nagell and W. Ljunggren, as we can see in the link $19^2 + 19 + 1 = 7^3$ is the only solution when $n=3$. Therefore $(19,7)$ is the only solution. It is possible to just solve it as finding integral points on elliptic curves but alas I don't have the knowledge required for that.

i9Fn
  • 531