Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #20 Aug 31 2018 15:59:03
%S 1,7,11,19,69,93,43,235,177,67,497,395,249,515,321,635,655,417,1057,
%T 163,1837,895,2483,1791,633,1561,1135,3585,1757,3419,2981,849,921,
%U 5909,993,1735,6821,3303,1137,6511,3771,9051,6585,2215,3241,3269,11975,3409,4419,1497,10563,2615,1641,5067,2855
%N Let p = n-th prime == 3 mod 4; a(n) = (sum of quadratic nonresidues mod p) - (sum of quadratic residues mod p).
%C Equals A282036 - A282035.
%H Rémy Sigrist, <a href="/A282037/b282037.txt">Table of n, a(n) for n = 1..10000</a>
%H Christian Aebi and Grant Cairns. <a href="http://arxiv.org/abs/1512.00896">Sums of Quadratic residues and nonresidues</a>, arXiv preprint arXiv:1512.00896 [math.NT] (2015).
%p with(numtheory):
%p a:=[]; m:=[]; d:=[];
%p for i1 from 1 to 200 do
%p p:=ithprime(i1);
%p if (p mod 4) = 3 then
%p sp:=0; sm:=0;
%p for j from 1 to p-1 do
%p if legendre(j,p)=1 then sp:=sp+j; else sm:=sm+j; fi; od;
%p a:=[op(a),sp]; m:=[op(m),sm]; d:=[op(d),sm-sp];
%p fi;
%p od:
%p a; m; d; # A282035, A282036, A282037
%t sum[p_] := Total[If[JacobiSymbol[#, p] == 1, -#, #]& /@ Range[p-1]];
%t sum /@ Select[Prime[Range[200]], Mod[#, 4] == 3&] (* _Jean-François Alcover_, Aug 31 2018 *)
%Y Sums of residues, nonresidues, and their differences, for p == 1 mod 4, p == 3 mod 4, and all p: A171555; A282035, A282036, A282037; A076409, A125615, A282038.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Feb 20 2017