This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A095978 #28 Sep 17 2016 11:52:50 %S A095978 2,3,3,7,11,19,15,19,23,19,31,35,31,43,47,67,59,51,67,71,79,79,83,79, %T A095978 79,99,103,107,115,127,127,131,159,139,163,151,179,163,167,147,179, %U A095978 163,191,207,195,199,211,223,227,259,207,239,271,251,255,263 %N A095978 Number of solutions to y^2=x^3+x (mod p) as p runs through the primes. %C A095978 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 %C A095978 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 %D A095978 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. %H A095978 Robert Israel, <a href="/A095978/b095978.txt">Table of n, a(n) for n = 1..10000</a> %F A095978 a(1) = 2; if prime(n) == 3 (mod 4) then a(n) = prime(n); if prime(n) = A002144(m) then if A002972(m) == 1 (mod 4) then a(n) = prime(n) - 2*A002972(m), otherwise a(n) = prime(n) + 2*A002972(m). %e A095978 n = 21: prime(21) = A000040(21) = 73 = A002144(9) == 1 (mod 4), A002972(9) = 3 == 3 (mod 4) (not 1 (mod 4)), a(n) = 73 + 2*3 = 79. %e A095978 n = 22: prime(22) = A000040(22) = 79 == 3 (mod 4), a(n) = prime(22) = 79. %p A095978 a:= proc(n) %p A095978 local p, xy, x; %p A095978 p:= ithprime(n); %p A095978 if p mod 4 = 3 then return p fi; %p A095978 xy:= [Re,Im](GaussInt:-GIfactors(p)[2][1][1]); %p A095978 x:= op(select(type,xy,odd)); %p A095978 if x mod 4 = 1 then p - 2*x else p + 2*x fi %p A095978 end proc: %p A095978 a(1):= 2: %p A095978 map(a, [$1..100]); # _Robert Israel_, Feb 09 2016 %t A095978 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_*) %Y A095978 Cf. A000040, A002144, A002972, A267859. %K A095978 nonn %O A095978 1,1 %A A095978 _Lekraj Beedassy_, Jul 16 2004 %E A095978 Edited. Update of reference, formula corrected, examples given, and a(21) - a(56) from _Wolfdieter Lang_, Feb 06 2016