find all the integral solution for $y^2 + 31 = x^3$ Find all the integral solution for $y^2 + 31 = x^3$.
I am reading Ireland's book 'a classical introduction to modern number theory', this is one of the exercises. The hint behind the book is $y^2 + 4 = x^3 - 27$, I don't know how to use it. I use python tried below $1000$ there is no solution. And also there is no prime $p$ below $10000$ such that $y^2 + 31 = x^3 (\text{mod} p)$ not solvable. Thank you
 A: I found the solution of this problem in Introductory Algebraic Number Theory by Saban Alaca, page 399, Theorem 14.2.5. Here is the solution.
First we prove $x$ is odd impossible. If $x$ is odd, then $y$ is even, by $y^2+4=x^3-27=(x-3)(x^2+3x+9)$, $y^2+4=4(\frac{y}{2}+1)^2$ then any odd prime $p$ divides $y^2+4$ must have $p \equiv 1 \bmod 4$. If $x \equiv 1 \bmod4$, then $y^2 \equiv 2 \bmod4$, contradiction. If $x \equiv 3 \bmod4$, then $x^2 + 3x + 9 \equiv -1 \bmod4$ and greater than 1. Hence there is a prime $q \equiv -1 \bmod4$ divides $x^2+3x+9$, this is a contradiction to we have known that any odd prime $p$ divides $y^2+4$ must have $p \equiv 1 \bmod4$.
Second we prove $x$ is even impossible. Let $K = Q(\sqrt{-31})$. Consider prime 2 in $O_K$. $$2O_K = (2, \frac{3+\sqrt{-31}}{2})(2, \frac{3-\sqrt{-31}}{2}).$$ $$(\frac{y+\sqrt{-31}}{2})(\frac{y-\sqrt{-31}}{2}) = (2, \frac{3+\sqrt{-31}}{2})(2, \frac{3-\sqrt{-31}}{2})(\frac{x}{2})^3.$$ We can prove ideal $(2, \frac{3+\sqrt{-31}}{2})$ is not principal by considering its ideal norm. Also the ideals $(\frac{y+\sqrt{-31}}{2})$ and $(\frac{y-\sqrt{-31}}{2})$ are coprime since the common prime ideal divides them is $(\sqrt{-31})$, which is impossible. Then by $(\frac{y+\sqrt{-31}}{2})(\frac{y-\sqrt{-31}}{2}) = (2, \frac{3+\sqrt{-31}}{2})(2, \frac{3-\sqrt{-31}}{2})(\frac{x}{2})^3$ we know there is an ideal $A$ which has $(\frac{y+\sqrt{-31}}{2})=(2, \frac{3+\sqrt{-31}}{2})A^3$ or $(\frac{y-\sqrt{-31}}{2})=(2, \frac{3+\sqrt{-31}}{2})A^3$. By class number of $K$ equals 3, $A^3$ must be principal. Then $(2, \frac{3+\sqrt{-31}}{2})$ is principal. But we already use ideal norm shows it's not.
