login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282042 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic nonresidues mod p that are > p/2. 5
11, 128, 219, 520, 1176, 1348, 2221, 3310, 4766, 6106, 8034, 8271, 10049, 12443, 14613, 15193, 21012, 27486, 26814, 30664, 39248, 39318, 41699, 48888, 46052, 52595, 74613, 72878, 78599, 85768, 107895, 103643, 111125, 111195, 130497, 145619, 148490, 160159, 169503, 166856, 180406, 194204 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Aebi, Christian, and Grant Cairns. Sums of Quadratic residues and nonresidues, arXiv preprint arXiv:1512.00896 (2015).
MAPLE
with(numtheory):
Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[];
for i1 from 1 to 300 do
p:=ithprime(i1);
if (p mod 8) = 7 then
ql:=0; qu:=0; q:=0; nl:=0; nu:=0; n:=0;
for j from 1 to p-1 do
if legendre(j, p)=1 then
q:=q+j;
if j<p/2 then ql:=ql+j; else qu:=qu+j; fi;
else
n:=n+j;
if j<p/2 then nl:=nl+j; else nu:=nu+j; fi;
fi;
od;
Ql:=[op(Ql), ql];
Qu:=[op(Qu), qu];
Q:=[op(Q), q];
Nl:=[op(Nl), nl];
Nu:=[op(Nu), nu];
N:=[op(N), n];
fi;
od:
Ql; Qu; Q; Nl; Nu; N; # A282039, A282040, A282041, A282039 again, A282042, A282043
MATHEMATICA
sum[p_]:= Total[If[#>p/2 && JacobiSymbol[#, p] != 1, #, 0]& /@ Range[p-1]];
sum /@ Select[Range[7, 1000, 8], PrimeQ] (* Jean-François Alcover, Aug 31 2018 *)
CROSSREFS
Sequence in context: A363111 A181012 A168327 * A015601 A024144 A201877
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Feb 20 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:07 EDT 2024. Contains 371964 sequences. (Running on oeis4.)