# Solve the Diophantine Equation $x^2 + 7 = y^5$.

This is a duplicate question of Find integers solutions of $x^2+7=y^5$, however there was no full answer. The solutions $$(\pm5, 2)$$ and $$(\pm 181, 8)$$ have been found.

The usual strategy for such a question is to work inside the ring of integers of $$\mathbb{Q}(\sqrt{-7})$$, which is $$\mathcal{O} = \mathbb{Z}[ \frac{1+\sqrt{-7}}{2}]$$. It turns out that this is a unique factorisation domain (which one can figure out by calculating its Class group). So it is natural to factor the equation as $$(x - \sqrt{-7})(x+\sqrt{-7}) = y^5$$. If we assume that $$x-\sqrt{-7}$$ and $$x+\sqrt{-7}$$ are coprime, we find that $$x+\sqrt{-7} = \beta^5$$ for a certain $$\beta = a + b\frac{1+\sqrt{-7}}{2}\in \mathbb{Z}[\frac{1+\sqrt{-7}}{2}]$$. Writing $$c= 2a+b$$ and expanding the fifth power, this gives the system of equations $$c^5 -70 c^3 b^2 + 245 c^4 b = 32 x,$$ $$5 c^4 b -70 c^2 b^3 + 49 b^5 = 32.$$ Now with enough patience, one can show that this system has no solutions with $$b \equiv c \pmod{2}$$.

However this contradicts the solutions that we have found. And indeed there's no reason for $$x \pm \sqrt{-7}$$ to be coprime when $$x$$ is odd.

What is the approach to solve the remaining case of this diophantine equation?

One approach that I have tried is that the coprime condition holds inside the ring $$\cal{O}[\frac{1}{2}]$$. This gives the equation $$x + \sqrt{-7} = (a+b\sqrt{-7})^5$$ with $$a,b \in \mathbb{Z}[\frac{1}{2}]$$, which I am unable to solve.

Consider the general case $$x^2+7=y^m \tag{1}$$ (Integers $$(x, y, m), \, m \geq 3)$$ Let $$\rho = (1+\sqrt{-7})/2$$

Then as you are aware $$(1, \rho)$$ is a basis for the ring of integers of the field $$\mathbb{Q}(-7)$$. A standard factorization argument then compels us to devise a $$\frac{x-1}{2}+\rho = \rho^{m-5}(U+\rho V)^m$$

For the case where $$m=5$$ one needs only consider the coefficients of $$(U, V)$$ and form $$−U^5 − 15U^4V − 10U^3V^2 + 50U^2V^3 + 35UV^4 − 3V^5 = 1$$ This is a version of the Thue equation which I can solve using the R package NILDE.

Using this, the only solution is the only solutions to the above equation are $$(U, V ) = (−1, 0),(2, −1)$$, which then give solutions proper as $$(5, x, y)=(5, ±5, 2),(5, ±181, 8)$$

Now, in Lesage, the author shows various partial results concerning the equation $$(1)$$, including the following.

• There are integer solutions to equation (1) with $$m = 5, 7, 13$$, this he proves by reducing to Thue equations, which he then solves by hand.
• There are no solutions to equation (1) for $$m = 11$$ and for $$m$$ prime and $$17 \leq m \leq 5000$$. This he proves using classical algebraic number theory, and a computational method.
• If $$(x, y, m)$$ is a solution to (1) then $$m \leq 6.6 × 10^{15}$$. This he proves using lower bounds for linear forms in logarithms.
• Could you elaborate, what is the 'standard factorisation argument' that you mention? Jan 15, 2020 at 16:49
• Hello, are you happy with offering I gave and the answer below?
– user284001
Jan 16, 2020 at 22:24

A possible factorization argument leading up till @Kevin's final form, for reference.

Since $$(x+\sqrt{-7}) - (x-\sqrt{-7}) = 2\sqrt{-7}$$ The possible common factors are $$\sqrt{-7}$$ and the prime elements of norm $$2$$ (which works out to be $$(1\pm \sqrt{-7})/2$$). The former will cause $$x$$ to be divisible by $$7$$ and hence fails in the original equation, so we exclude it since it can't happen.

If $$x$$ is even, then $$x\pm \sqrt{-7}$$ has odd norm so they can't have that common factor of norm $$2$$. This is the part you wrote down.

However if $$x=2r+1$$ is odd, then since $$\frac{x + \sqrt{-7}}{2} = r + \frac{1+\sqrt{7}}{2}\in\mathcal O, \frac{x - \sqrt{-7}}{2} = r+1 - \frac{1+\sqrt{7}}{2} \in \mathcal O,$$ the common factor between $$x+\sqrt{-7}$$ and $$x-\sqrt{-7}$$ is exactly $$2$$. Since we also know that $$y=2s$$ must be even, this means \begin{align*} 2^2\left(r+\frac{1+\sqrt{-7}}{2}\right)\left(r+1-\frac{1+\sqrt{-7}}{2}\right) &= 2^5s^5\\ \left(r+\frac{1+\sqrt{-7}}{2}\right)\left(r+1-\frac{1+\sqrt{-7}}{2}\right) &= 2^3s^5 = \left(\frac{1+\sqrt{-7}}{2}\right)^3\left(\frac{1-\sqrt{-7}}{2}\right)^3s^5 \end{align*} So by the coprime-ness (and absorbing any units into $$\beta^5$$), you now have 4 possibilities $$r+\frac{1+\sqrt{-7}}{2} \in \left\{\beta^5,\left(\frac{1+\sqrt{-7}}{2}\right)^3\beta^5,\left(\frac{1-\sqrt{-7}}{2}\right)^3\beta^5,2^3\beta^5\right\}$$ With $$\beta = a+b(1+\sqrt{-7})/2$$ this works out to be 4 different (Thue) equations when comparing the real and imaginary parts: \begin{align*} E1: 2r &= -1 + 2 a^5 + 5 a^4 b - 30 a^3 b^2 - 50 a^2 b^3 + 5 a b^4 + 11 b^5\\ 1 &= 5 a^4 b + 10 a^3 b^2 - 10 a^2 b^3 - 15 a b^4 - b^5\\ E2: 2r &= -1 - 5 a^5 + 5 a^4 b + 110 a^3 b^2 + 90 a^2 b^3 - 65 a b^4 - 31 b^5\\ 1 &= - a^5 - 15 a^4 b - 10 a^3 b^2 + 50 a^2 b^3 + 35 a b^4 - 3 b^5\\ E3: 2r &= -1 - 5 a^5 - 30 a^4 b + 40 a^3 b^2 + 160 a^2 b^3 + 40 a b^4 - 24 b^5\\ 1 &= a^5 - 10 a^4 b - 40 a^3 b^2 + 40 a b^4 + 8 b^5\\ E4: 2r &= -1 + 16 a^5 + 40 a^4 b - 240 a^3 b^2 - 400 a^2 b^3 + 40 a b^4 + 88 b^5\\ 1 &= 40 a^4 b + 80 a^3 b^2 - 80 a^2 b^3 - 120 a b^4 - 8 b^5 \end{align*} Equation 4 clearly has no solutions modulo 2.

Equation 1 must have $$b=\pm 1$$, then solving for $$a$$ (factoring over $$\mathbb Z$$) gives only two integer solutions: $$(a,b)= (0,-1),(1,-1)$$. Then $$r=-6,5$$ which corresponds to $$x=-11,11$$, which both fails.

For equation 2, doing a substitution of $$(a,b,r) = (-u - v, v, -w-1)$$ will reveal that it's exactly the same form as equation 3. (Upon which $$(u,v,w) = (a,b,r)$$ in equation 3.)

Equation 2 is given by @Kevin's solution. Alternatively Using Pari/GP to solve the Thue equation $$1 = - a^5 - 15 a^4 b - 10 a^3 b^2 + 50 a^2 b^3 + 35 a b^4 - 3 b^5$$ returns $$(a,b) = (-1, 0), (2, -1)$$ Then $$r=90,2$$, so $$x=181,5$$. Then for equation 3, using the earlier relationship of $$(u,v,w) = (-a-b,b,-r-1)$$ gives $$w =-91,-3$$. Hence $$x=-181,-5$$.

• The so called Lebesgue-Nagell diophantine equation $x^2+D=y^n, n\ge3$, has been completely solved by Y. Bugeaud, M. Mignotte & S. Siksek for $1\le D\le 100$, using modular methods "à la" Wiles. See arXiv:math/0405220v1. In particular, if $D=7$, the absolute value of $x$ is $1,3,5,11$ or $181$. Jan 16, 2020 at 10:03