Solution (source code)

= Solution

Suppose $y^2+21=x^3$. Its positive left side gives $x>0$. Reduction modulo four shows that $x$ is odd and $y$ even. Moreover $3\mid y$ would make the valuation of $y^2+21$ at 3 equal to one, impossible for a cube. The same argument excludes $7\mid y$.

In $\mathbb Z[s]$, factor $(y+s)(y-s)=(x)^3$. Any common <prime ideal> divisor divides both $2y$ and $2s$, so must lie above 2, 3 or 7. The odd norm excludes 2, and the previous divisibility arguments exclude 3 and 7. The two ideals are therefore coprime. Unique factorization of ideals gives $(y+s)=I^3$. The class group has exponent two, so $[I]^3=1$ implies $[I]=1$. Thus $I=(a+bs)$, and the only <units>, $\pm1$, can be absorbed into a cube. It follows that
$$
y+s=(a+bs)^3.
$$
Comparing the coefficient of $s$ gives $1=3b(a^2-7b^2)$, an impossibility over the integers. Consequently \b[there are no integer solutions]: this is the <no integer solutions of the Mordell equation with constant minus twenty-one> result. The class-group argument is essential: element factorization was not assumed to be unique.