<s>[INST] Showing that $x^2+5=y^3$ has no integer solutions. I'm trying to show that the Diophantine equation $x^2+5=y^3$ has no integer solutions using the fact that $\mathbb Z[ \sqrt{-5}]$ has class number two. I think I have the general idea, but I'm having a tough time establishing the statement in bold below. Any ideas? 
The equation gives a factorization into ideals 
$$
(x+\sqrt{-5})(x-\sqrt{-5})=(y)^3
$$
in $\mathbb Z[ \sqrt{-5}]$. Assuming that $(x+\sqrt{-5})$ and $(x-\sqrt{-5})$ are relatively prime, we know that $(x+\sqrt{-5})=\mathfrak a^3$ and $(x-\sqrt{-5})=\mathfrak b^3$ for some ideals $\mathfrak a, \mathfrak b$ in $\mathbb Z[ \sqrt{-5}]$. Then the classes of $\mathfrak a$ and $\mathfrak b$ have order dividing 3 in the class group, hence they must both be principal, generated by some $\alpha,\beta\in \mathbb Z[\sqrt{-5}]$, respectively, as the class number is 2. Hence $\alpha^3=x+\sqrt{-5}$ up to units ($\pm 1$), and matching up real and imaginary parts then gives a contradiction. 
How can I show that the ideals $(x+\sqrt{-5})$ and $(x-\sqrt{-5})$ are relatively prime? I was trying something along the lines of letting $\mathfrak p$ be a prime of $\mathbb Z[\sqrt{-5}]$ diving both ideals, in which case it also divides their sum (gcd). Then $$2\sqrt{-5}=x+\sqrt{-5}-(x-\sqrt{-5})\in (x+\sqrt{-5},x-\sqrt{-5})\subseteq \mathfrak p,$$ so $\mathfrak p\mid (2\sqrt{-5})$... But I'm not totally sure where I'm going with this. 
 [/INST] If ideals $I,J$ are relatively prime then their sum generates the ring $R$, so we can show this. In particular we can show also that
$$
(a + b\sqrt {- 5})(x+ \sqrt{- 5}) + (c + d\sqrt {- 5})(x - \sqrt {- 5}) = 1
$$
for some $a,b,c,d$.  
This gives the equations
$$
\begin{align}
(a+c)x - 5(b-d) &= 1\\
(a-c) + (b+d)x &= 0
\end{align}
$$
So a necessary condition is $5$ does not divide $x$. This can be checked to be true from $x^2 + 5 = y^3$, but otherwise the ideals are not necessarily relatively prime in general.  

Setting
$$
c = a + (b+d)x
$$
gives us
$$
2ax = (1+5(b-d)) - (b+d)x^2
$$
Taking $\pmod 2$ we see that $x$ must be even, so to get an integer solution for $a$ we must have $1+5(b-d)$ divisible by $2x$.  
The obvious way is to look at the linear diophantine solutions
$$
xu - 5v = 1
$$
We can always choose $u$ to be even, so now we can set $d=0, v=b$ to get
$$
\begin{align}
a &= \frac{1+5(b-d)}{2x} - (b+d)\frac{x}{2}\\
&= \frac{1+5v}{2x} - v\frac{x}{2}\\
&= \frac{u}{2} - v\frac{x}{2}
\end{align}
$$
Since $u/2$ is integral we just need $vx$ to be even, which is true based on an earlier assumption: $x$ must be even.  

It remains to show that $x$ is indeed even. 
If $x=2m+1$ is odd, then $y$ is even and
$$
x^2 + 5 = 4m^2+4m+ 6 \equiv 2\pmod 4
$$
which contradicts $y^3 \equiv 0 \pmod 4$. Hence $x$ is even and we are done, finding a solution to the initial equation as
$$
(u/2 -vx/2 + v\sqrt {-5})(x + \sqrt {-5}) + (u/2 + vx/2)(x - \sqrt {-5}) = 1
$$
(Recall that $xu-5v=1$ and $u$ chosen to be even.)  
Since the two ideals generate $1$, they are relatively prime.
</s>