I've the following number:


Now I know that $n\in\mathbb{N}^+$ and $n\ge3$ (and $n$ has a given value) besides that $x\in\mathbb{N}^+$ and $x\ge2$.

I want to check if the number is a perfect square, so I can rewrite $(1)$ as follows:


Where $y\in\mathbb{Z}$.

In this problem I've: $n=71$, the number is equal to;


So, I used SageMathCell to look for the integral points on the elliptic curve and the code that was used is the following:

E = EllipticCurve([0, β, 0, γ, δ])
P = E.integral_points()
for p in P:
    if p[0] % α == 0:
        print(p[0] // α, p[1] // α)

I found the coeficients I need to use using equation $(2)$ and $(3)$ (but I do not know if they are corect):

  • $$\alpha=12(71-2)^2=57132\tag4$$
  • $$\beta=36(71-2)=2484\tag5$$
  • $$\gamma=-144(71-5)(71-2)^3=-3122149536\tag6$$
  • $$\delta=1296(71-4)^2(71-2)^4=131871507195024\tag7$$

So the final code looks like:

E = EllipticCurve([0, 2484, 0, -3122149536, 131871507195024])
P = E.integral_points()
for p in P:
    if p[0] % 57132 == 0:
        print(p[0] // 57132, p[1] // 57132)

But I found no solutions and it should give at least one solution at $x=1585$.

What mistake have I made?

  • 4
    $\begingroup$ Use EllipticCurve_from_cubic(y^2*z - (57132*x^3+2484*x^2*z-54648*x*z^2+40401*z^3)) to get a map from your cubic to a Weierstrass model without having to think. The forum for asking questions of this type is ask.sagemath.org. $\endgroup$ – Chris Wuthrich Dec 3 '19 at 15:39
  • $\begingroup$ @ChrisWuthrich I've no idea what you mean by that comment, I'm sorry. $\endgroup$ – Jan Dec 3 '19 at 15:40
  • $\begingroup$ Sorry, I hit enter too early and now I have edited the comment. $\endgroup$ – Chris Wuthrich Dec 3 '19 at 15:41
  • $\begingroup$ I'm guessing that the SageMathCell computation timed out. I'm running SageMath on my desktop computer, and after running E = EllipticCurve([0, 2484, 0, -3122149536, 131871507195024]), the command P = E.integral_points() hasn't finished after more than an hour. $\endgroup$ – John Palmieri Dec 3 '19 at 18:06
  • 1
    $\begingroup$ Voted to closed as this really belongs to another forum. $\endgroup$ – godelian Dec 3 '19 at 20:34

After about an hour and a half running SageMath 9.0.beta7 on my computer, I see this:

sage: E = EllipticCurve([0, 2484, 0, -3122149536, 131871507195024])
sage: P = E.integral_points()
sage: for p in P:
....:    if p[0] % 57132 == 0:
....:        print(p[0] // 57132, p[1] // 57132)
(-1, 201)
(0, 201)
(1, 213)
(1585, 15083061)
  • $\begingroup$ Just being curious: what is the rank of that curve? Usually the computation of the Mordell-Weil group is the main task in integral_points, but situation might be different here, since the curve has such a large height. BTW this code looks very familiar to me: math.stackexchange.com/questions/3459005/… $\endgroup$ – WhatsUp Dec 3 '19 at 19:50
  • 1
    $\begingroup$ If you insert after the first line the command E.simon_two_descent(), then the whole thing only takes some minutes. The reason is that this line sets E.gens() faster than mwrank does. simon_two_descent even allows to give known points which could speed up a little bit further. - Moreover, since 57132 is divisible by 6 one can even switch to the global minimal model to recover all four points and that is done in seconds ! $\endgroup$ – Chris Wuthrich Dec 3 '19 at 21:20
  • $\begingroup$ @WhatsUp: E.rank() returns 4. $\endgroup$ – John Palmieri Dec 3 '19 at 21:34
  • 1
    $\begingroup$ @ChrisWuthrich: confirmed: E.simon_two_descent() takes 6.5 seconds, after which P = E.integral_points() takes under a second (as opposed to 80-90 minutes before). $\endgroup$ – John Palmieri Dec 3 '19 at 21:36
  • $\begingroup$ @ChrisWuthrich Quite interesting! But I don't understand the logic here. In the documentation math.sciences.univ-nantes.fr/~sorger/chow/html/en/reference/… , it is mentioned This method is used internally by the rank(), rank_bounds() and gens() methods. But we don't supply any input here, so why does a mere default call to simon_two_descent (which is supposed to be used in e.g. rank()) speed up the computation? $\endgroup$ – WhatsUp Dec 3 '19 at 21:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.