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!)
A282041 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic residues mod p. 5
7, 92, 186, 423, 994, 1343, 2369, 3683, 5134, 6012, 7831, 8955, 11596, 12428, 15517, 16802, 21148, 28720, 31929, 33321, 41807, 44778, 51856, 51253, 57466, 57845, 82063, 88015, 95281, 97050, 117916, 127225, 130025, 135180, 165423, 161927, 176915, 183609, 193132, 202180, 228212, 228056, 236849 (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
Table[Table[Mod[a^2, p], {a, 1, (p-1)/2}]//Total, {p, Select[Prime[Range[100]], Mod[#, 8] == 7 &]}] (* Vincenzo Librandi, Feb 21 2017 *)
CROSSREFS
Sequence in context: A124557 A195213 A317370 * A027955 A124654 A267204
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 05:18 EDT 2024. Contains 371964 sequences. (Running on oeis4.)