login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282039 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic residues mod p that are < p/2. 5
3, 33, 60, 138, 315, 390, 663, 1008, 1425, 1743, 2280, 2475, 3108, 3570, 4323, 4590, 6045, 8055, 8418, 9168, 11610, 12045, 13398, 14340, 14823, 15813, 22425, 23028, 24885, 26163, 32310, 33033, 34503, 35250, 42333, 43995, 46548, 49173, 51870, 52785, 58443, 60393, 61380, 66435, 67470, 70623 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Table of n, a(n) for n=1..46.

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, 1100, 8], PrimeQ] (* Jean-Fran├žois Alcover, Aug 31 2018 *)

CROSSREFS

Cf. A282035-A282043 and A282721-A282727.

Sequence in context: A248397 A069165 A180116 * A186680 A139222 A123049

Adjacent sequences:  A282036 A282037 A282038 * A282040 A282041 A282042

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 7 23:53 EDT 2020. Contains 336280 sequences. (Running on oeis4.)