Skip to main content
2 of 2
"priems" should be "primes"
gmvh
  • 3.1k
  • 6
  • 27
  • 45

Here's a proof that the $x=1$ solution is unique using only facts about "Pell equations" that were already known to Fermat (if not centuries earlier to Bhaskara II et al.) and should generalize at least to $p^x + 2 = y^2$ for odd primes $p$ such that $p+2$ is a square. I'll simplify the formulas by using $\sqrt 7$ (more generally, $\sqrt p$).

We start by observing that $x$ must be odd; this can be seen in various ways, for example by reducing $\bmod 4$. So, $7^x = 7 z^2$ where $z = 7^{(x-1)/2}$, and we seek solutions of $y^2 - 7 z^2 = 2$ where $z$ is a power of $7$. Now the general solution of $y^2 - 7z^2 = 2$ in natural numbers $y,z$ is $(y_n,z_n)$ such that $$ y_n + z_n \sqrt7 = \alpha u^n \quad (n \geq 0) $$ where $\alpha = 3+\sqrt 7$ and $u$ is the fundamental unit $\alpha / \bar\alpha = 8 + 3\sqrt 7$. (Note that this gives $y_n - z_n \sqrt 7 = \alpha u^{-(n+1)}$, so the solutions coming from $n < 0$ only repeat those with $n \geq 0$.) Now if $x > 1$ then $7 \mid z$, which happens if and only if $7 \mid 2n+1$. But then $z_n$ is a multiple of $z_3 = 7 \cdot 617$, and $617$ is not a multiple of $7$. Therefore $z_n$ is never a power of $7$ other than 1, QED.

(Alternatively, having found the condition $7 \mid 2n+1$ for $7 \mid z_n$, we could continue by asking when $7^2 \mid z_n$, $\ 7^3 \mid z_n$, etc., finding that $7^e | z_n$ if and only if $7^e | 2n+1$, and then $z_n \geq z_{(7^e-1)/2}$ which is much larger than $7^e$.)

Noam D. Elkies
  • 79.9k
  • 15
  • 281
  • 376