Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I find all $m,n\in\mathbb{Z}$ satisfying $n^2+n+1=m^3$?

share|cite|improve this question
I was able to reduce it to the two equations a^3 - 3a^2b + b^3 = +/- 1 and a^3 + 3a^2b - 6ab^2 + b^3 = +/- 1 but I have not figured out how to solve them yet. – quanta Apr 2 '11 at 15:14
up vote 4 down vote accepted

There may well be more elementary solutions, but one way to go is to rewrite the equation as

$E: y^2 + y = x^3 - 1$.

That is, we wish to find all integral points on the elliptic curve $E$. For this, the integral points contain all torsion points of $E(\mathbb{Q})$, with equality iff the Mordell-Weil rank is zero. Moreover it is easy to find all torsion points. So one hopes that the rank is zero (which happens, according to conventional wisdom, about half the time).

Using the MAGMA computer algebra package:

$\gt$ E := EllipticCurve([0,0,1,0,-1]);
$\gt$ E;
Elliptic Curve defined by y^2 + y = x^3 - 1 over Rational Field
$\gt$ TorsionSubgroup(E);
Abelian Group of order 1
$\gt$ MordellWeilRank(E);

So no luck: the Mordell-Weil rank is 1, so there are infinitely many $\mathbb{Q}$-rational points on $E$ and in fact no torsion points (other than the point at infinity $[0:1:0]$ which is missing from our affine equation for $E$).

So we move on to the built-in algorithm for computing all integral points on an elliptic curve:

$\gt$ I := IntegralPoints(E);
$\gt$ I;
[ (1 : 0 : 1), (7 : -19 : 1) ]
$\gt$ P1 := I1;
$\gt$ P1;
(1 : 0 : 1)
$\gt$ -P1;
(1 : -1 : 1)
$\gt$ P2 := I2;
$\gt$ P2;
(7 : -19 : 1)
$\gt$ -P2;
(7 : 18 : 1)

The answers here are in projective form $(X,Y,Z)$ so correspond to affine coordinates $(x,y) = (X/Z,Y/Z)$. Of course we want integral points, so it is no surprise that the $Z$-coordinate is equal to $1$ in every case. Note that I did a little more than just running the IntegralPoints command, because according to the fine print here or here the command only returns integral points "up to negation", which I took to mean that one has to also compute the Mordell-Weil inverses of the all the points on the list. Thus we get that there are four affine integral points on $E$:

$(x,y) = (1,0), \ (1,-1), \ (7,-19), \ (7,18)$.

I should say that although I am a fairly regular MAGMA user, I don't have much experience with the IntegralPoints package, so this answer is provided without warranty...

share|cite|improve this answer
Thanks! But why $E$ is an elliptic curve? I have read that an elliptic curve has three parameters, not just $x$ and $y$. The definition I read was from Qing Liu: Algeraic Geometry and Arithmetic Curves page 217. – user9009 Apr 2 '11 at 12:44
You are thinking about the projective form of an elliptic curve, obtained by "homogenizing" the polynomial: $y^2z + yz^2 = x^3 - z^3$. But the notion of "integral point" really is particular to the (given) affine equation: in projective space, there is no difference between integral points and rational points, because $(a,b,c)$ is regarded as the same point as $(\lambda a, \lambda b, \lambda c)$ for any nonzero $\lambda$. – Pete L. Clark Apr 2 '11 at 18:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.