A095978 Number of solutions to y^2=x^3+x (mod p) as p runs through the primes.
2, 3, 3, 7, 11, 19, 15, 19, 23, 19, 31, 35, 31, 43, 47, 67, 59, 51, 67, 71, 79, 79, 83, 79, 79, 99, 103, 107, 115, 127, 127, 131, 159, 139, 163, 151, 179, 163, 167, 147, 179, 163, 191, 207, 195, 199, 211, 223, 227, 259, 207, 239, 271, 251, 255, 263
Offset: 1
Keywords
Examples
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. n = 22: prime(22) = A000040(22) = 79 == 3 (mod 4), a(n) = prime(22) = 79.
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
Programs
-
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*)
Formula
Extensions
Edited. Update of reference, formula corrected, examples given, and a(21) - a(56) from Wolfdieter Lang, Feb 06 2016
Comments