OFFSET
1,1
COMMENTS
The only rational solution of y^2 = x^3 + x is (y, x) = (0, 0). See the Silverman reference, Theorem 44.1 with a proof on pp. 388 - 390 (in the 4th edition, 2014, Theorem 1, pp. 354 - 356). - Wolfdieter Lang, Feb 08 2016
This is also the number of solutions to y^2 = x^3 - 4*x (mod p) as p runs through the primes. - Seiichi Manyama, Sep 16 2016
REFERENCES
J. H. Silverman, A Friendly Introduction to Number Theory, 3rd ed., Pearson Education, Inc, 2006, Theorem 45.1 on p. 399. In the 4th edition, 2014, Theorem 1 on p. 365.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
MAPLE
a:= proc(n)
local p, xy, x;
p:= ithprime(n);
if p mod 4 = 3 then return p fi;
xy:= [Re, Im](GaussInt:-GIfactors(p)[2][1][1]);
x:= op(select(type, xy, odd));
if x mod 4 = 1 then p - 2*x else p + 2*x fi
end proc:
a(1):= 2:
map(a, [$1..100]); # Robert Israel, Feb 09 2016
MATHEMATICA
a[n_] := Module[{p, xy, x}, p = Prime[n]; If[Mod[p, 4]==3, Return[p]]; xy = {Re[#], Im[#]}& @ FactorInteger[p, GaussianIntegers -> True][[2, 1]]; x = SelectFirst[xy, OddQ]; If[Mod[x, 4]==1, p - 2*x, p + 2*x]]; a[1] = 2; Array[a, 100] (* Jean-François Alcover, Feb 26 2016, after Robert Israel*)
CROSSREFS
KEYWORD
nonn
AUTHOR
Lekraj Beedassy, Jul 16 2004
EXTENSIONS
Edited. Update of reference, formula corrected, examples given, and a(21) - a(56) from Wolfdieter Lang, Feb 06 2016
STATUS
approved