# Solve $x^3=y^2-7$? [duplicate]

This question already has an answer here:

How to solve $x^3=y^2-7$?

I can see that $x$ cannot be even. Since $x$ even, implies $y$ odd, hence LHS is congruent $0 \mod 8$ and RHS $2 \mod 8$. Contradiction.

So $x$ is odd and $y$ is even. Maybe helpful: $x^3+8 = (x+2)(x^2-2x+4)$ and the RHS is thus congruent $3 \mod 4$. But I don't know how to proceed. Can someone help me? Thanks in advance.

## marked as duplicate by Dietrich Burde, C. Falcon, JonMark Perry, Daniel W. Farlow, Community♦Jun 2 '17 at 6:56

• If you have a prime $q \equiv 3 \pmod 4,$ and $u^2 + v^2 \equiv 0 \pmod q,$ what does that say about $u,v?$ – Will Jagy Jun 1 '17 at 18:20
• Uhm, I don't know immediately. I know that if $q=u^2+v^2$, then there are no solutions since $q \equiv 3 \mod 4$. – bob Jun 1 '17 at 18:29
• Oh I know, then $-1$ is a quadratic residu modulo $q$. So you get a contradiction if $q \equiv 3 \mod 4$ – bob Jun 1 '17 at 18:31
• @WillJagy How can this help me to continue? Sorry, but I don't see how to proceed. – bob Jun 1 '17 at 18:51
• @TobErnack Okay thank you, but why is $y+\sqrt{7} = (a+b\sqrt{7})^3$? I thought $y+\sqrt{7} = u (a + b \sqrt{7})^3$ for some unit $u$ in $\mathbb{Z}[\sqrt{7}]$, and there are infinitely many such units in $\mathbb{Z}[\sqrt{7}]$, namely powers of the fundamental one $8+3\sqrt{7}$. So I don't know why you can take $u=1$? Or am I wrong? – bob Jun 1 '17 at 19:33

Look at the prime factorizations below, these are $u^2 + 1$ for integers $u.$ What do you see, or, more to the point, what do you not see? Can you prove that?

see general phenomenon, with proof, my answer at Prime divisors of $k^2+(k+1)^2$

The thing you do not see in the output below is any prime factors $q$ with $q \equiv 3 \pmod 4.$ Those would be $3,7,11,19,23,31,43,...$ Not there. The odd prime factors are $1 \pmod 4,$ as $5,13,17,29,37,41,...$

============================

  u  0  u^2 + 1  1 =  1
u  1  u^2 + 1  2 = 2
u  2  u^2 + 1  5 = 5
u  3  u^2 + 1  10 = 2 * 5
u  4  u^2 + 1  17 = 17
u  5  u^2 + 1  26 = 2 * 13
u  6  u^2 + 1  37 = 37
u  7  u^2 + 1  50 = 2 * 5^2
u  8  u^2 + 1  65 = 5 * 13
u  9  u^2 + 1  82 = 2 * 41
u  10  u^2 + 1  101 = 101
u  11  u^2 + 1  122 = 2 * 61
u  12  u^2 + 1  145 = 5 * 29
u  13  u^2 + 1  170 = 2 * 5 * 17
u  14  u^2 + 1  197 = 197
u  15  u^2 + 1  226 = 2 * 113
u  16  u^2 + 1  257 = 257
u  17  u^2 + 1  290 = 2 * 5 * 29
u  18  u^2 + 1  325 = 5^2 * 13
u  19  u^2 + 1  362 = 2 * 181
u  20  u^2 + 1  401 = 401
u  21  u^2 + 1  442 = 2 * 13 * 17
u  22  u^2 + 1  485 = 5 * 97
u  23  u^2 + 1  530 = 2 * 5 * 53
u  24  u^2 + 1  577 = 577
u  25  u^2 + 1  626 = 2 * 313
u  26  u^2 + 1  677 = 677
u  27  u^2 + 1  730 = 2 * 5 * 73
u  28  u^2 + 1  785 = 5 * 157
u  29  u^2 + 1  842 = 2 * 421
u  30  u^2 + 1  901 = 17 * 53


===========================================

• Uhm, that there are no squares? – bob Jun 1 '17 at 18:47