6

This is a question to ponder about the occurrence of prime $p$ giving $p^3 + p^2 + p +1=n^2$ as is true with $7$ giving $400=20^2$. Do you think this will ever happen again?

Marcus M
  • 11,229

1 Answers1

10

There are no more positive prime solution other than $p = 7$.

First, we known $p = 2$ doesn't work, we can assume $p$ is an odd prime.
Let's say $p$ is an odd prime such that

$$p^3 + p^2 + p + 1 = n^2\quad\iff\quad(p^2+1)(p+1) = n^2$$

Since $\gcd(p+1,p^2+1) = \gcd(p+1,2) = 2$, we find for some $k, m > 0$,

$$\begin{cases} p^2 + 1 &= 2m^2\\ p + 1 &= 2k^2\\ \end{cases} \quad\iff\quad \begin{cases} m = \sqrt{\frac{p^2+1}{2}}\\k = \sqrt{\frac{p+1}{2}}\end{cases}$$

Subtracting the two equations on the left, we obtain

$$p(p-1) = 2(m+k)(m-k)$$

Since $0 < m - k < m = \sqrt{\frac{p^2+1}{2}} < \sqrt{\frac{p^2+p^2}{2}} = p$, both $2$ and $m-k$ are coprime to $p$.
Since $p$ is a prime, we obtain $p | (m+k)$.
Since $m+k < 2m < 2p$, this forces $p = m + k$. As a result,

$$\begin{align} & 2(p^4 + m^4 + k^4) - (p^2 + m^2 + k^2)^2 = (p+m+k)(p+m-k)(p-m+k)(p-m-k) = 0\\ \iff & p^4 - 6p^3 - 7p^2 = (p-7)(p+1)p^2 = 0\\ \implies & p = 7\end{align} $$

In short, the equation

$$p^3 + p^2 + p + 1 = n^2$$ has one and only one positive prime solution. Namely, $p = 7$.

achille hui
  • 122,701