Find all solutions of the equality $y^2=x^3+23$ for integers $x,y$ [duplicate]
Solution 1:
There are no integer solutions.
You noted already that $x$ cannot be even, because the equation would then fail mod $4$; so we need only consider $x$ odd. Then $x^3+23$ is even, so must be a multiple of $4$, whence $x \equiv 1 \bmod 4$.
We cannot obtain a contradiction from further congruence considerations. But since $23 = 3^3 - 2^2$ we try adding $4$ on both sides, getting $$ y^2 + 4 = x^3 + 27 = (x+3) (x^2-3x+9), $$ and observe that $x \equiv 1 \bmod 4$ implies $x^2 - 3x + 9 \equiv 1 - 3 + 9 \equiv 3 \bmod 4$. Since also $x^2-3x+9 > 0$ we deduce that $x^2-3x+9$ has a prime factor $p \equiv 3 \bmod 4$. But this is impossible by quadratic reciprocity: $y$ would be a square root of $-4 \bmod p$. QED
(In fact mwrank reports that there aren't even any rational solutions, but that's not an elementary proof.)
[Added later: See Keith Conrad's Examples of Mordell's Equation for further examples of elementary but nontrivial proofs that certain equations of this form $y^2 = x^3 + k$ have no integer solutions, and also some examples where a nonempty list of solutions of $y^2 = x^3 + k$ can be proved complete.]