login
Integral solutions to Mordell's equation y^2 = x^3 - n with minimal absolute value of x (a(n) gives x-values).
2

%I #17 Feb 16 2025 08:33:58

%S 0,-1,1,0,-1,0,0,1,0,-1,0,-2,0,0,1,0,-1,7,5,0,0,3,0,1,0,-1,-3,2,0,19,

%T -3,0,-2,0,1,0,-1,11,0,6,2,0,-3,-2,0,0,0,1,0,-1,0,-3,0,3,9,2,-2,0,0,0,

%U 0,0,1,0,-1,0,0,-4,0,0,5,-2,2,0,0,-3,0,0,45,1,0,-1,0,0,0,0,0,0,-2,0,-3,2,0,3

%N Integral solutions to Mordell's equation y^2 = x^3 - n with minimal absolute value of x (a(n) gives x-values).

%C Conventionally, no solution is indicated by (x,y) = (0,0).

%H Jean-François Alcover, <a href="/A329921/b329921.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/MordellCurve.html">Mordell Curve</a>

%e For n=12, the "min |x|" solution is 2^2 = (-2)^3+12, hence xy(12) = [-2,2] and a(12) = -2;

%e for n=18, it is 19^2 = 7^3 + 18, hence xy(18) = [7,19] and a(18) = 7.

%t A081119 = Cases[Import["https://oeis.org/A081119/b081119.txt", "Table"], {_, _}][[All, 2]];

%t r[n_, x_] := Reduce[y >= 0 && y^2 == x^3 + n, y, Integers];

%t xy[n_] := If[A081119[[n]] == 0, {0, 0}, For[x = 0, True, x++, rn = r[n, x]; If[rn =!= False, Return[{x, y} /. ToRules[rn]]; Break[]]; rn = r[n, -x]; If[rn =!= False, Return[{-x, y} /. ToRules[rn]]; Break[]]]];

%t a[n_] := xy[n][[1]];

%t a /@ Range[120]

%Y Cf. A054504, A081119 (number of solutions), A134109, A329922 (y-values).

%K sign

%O 1,12

%A _Jean-François Alcover_, Nov 24 2019