A282037 Let p = n-th prime == 3 mod 4; a(n) = (sum of quadratic nonresidues mod p) - (sum of quadratic residues mod p).
1, 7, 11, 19, 69, 93, 43, 235, 177, 67, 497, 395, 249, 515, 321, 635, 655, 417, 1057, 163, 1837, 895, 2483, 1791, 633, 1561, 1135, 3585, 1757, 3419, 2981, 849, 921, 5909, 993, 1735, 6821, 3303, 1137, 6511, 3771, 9051, 6585, 2215, 3241, 3269, 11975, 3409, 4419, 1497, 10563, 2615, 1641, 5067, 2855
Offset: 1
Keywords
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Christian Aebi and Grant Cairns. Sums of Quadratic residues and nonresidues, arXiv preprint arXiv:1512.00896 [math.NT] (2015).
Crossrefs
Programs
-
Maple
with(numtheory): a:=[]; m:=[]; d:=[]; for i1 from 1 to 200 do p:=ithprime(i1); if (p mod 4) = 3 then sp:=0; sm:=0; for j from 1 to p-1 do if legendre(j,p)=1 then sp:=sp+j; else sm:=sm+j; fi; od; a:=[op(a),sp]; m:=[op(m),sm]; d:=[op(d),sm-sp]; fi; od: a; m; d; # A282035, A282036, A282037
-
Mathematica
sum[p_] := Total[If[JacobiSymbol[#, p] == 1, -#, #]& /@ Range[p-1]]; sum /@ Select[Prime[Range[200]], Mod[#, 4] == 3&] (* Jean-François Alcover, Aug 31 2018 *)
Comments