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!)
A282725 Let p = n-th prime == 3 mod 8; a(n) = sum of quadratic nonresidues mod p that are > p/2. 1

%I

%S 2,31,82,379,815,892,1520,2441,3840,4005,5104,6858,8928,10740,13507,

%T 15795,18516,21453,24225,27975,36584,38901,44044,49499,48060,53771,

%U 57606,64358,63845,68569,74783,79290,88512,90711,92810,105908,119870,128797,133819,144151,148620,156741,172650,191105

%N Let p = n-th prime == 3 mod 8; a(n) = sum of quadratic nonresidues mod p that are > p/2.

%H Robert Israel, <a href="/A282725/b282725.txt">Table of n, a(n) for n = 1..1000</a>

%H Aebi, Christian, and Grant Cairns. <a href="http://arxiv.org/abs/1512.00896">Sums of Quadratic residues and nonresidues</a>, arXiv preprint arXiv:1512.00896 (2015).

%p with(numtheory):

%p Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[]; Th:=[];

%p for i1 from 1 to 300 do

%p p:=ithprime(i1);

%p if (p mod 8) = 3 then

%p ql:=0; qu:=0; q:=0; nl:=0; nu:=0; n:=0;

%p for j from 1 to p-1 do

%p if legendre(j,p)=1 then

%p q:=q+j;

%p if j<p/2 then ql:=ql+j; else qu:=qu+j; fi;

%p else

%p n:=n+j;

%p if j<p/2 then nl:=nl+j; else nu:=nu+j; fi;

%p fi;

%p od;

%p Ql:=[op(Ql),ql];

%p Qu:=[op(Qu),qu];

%p Q:=[op(Q),q];

%p Nl:=[op(Nl),nl];

%p Nu:=[op(Nu),nu];

%p N:=[op(N),n];

%p Th:=[op(Th),q+ql];

%p fi;

%p od:

%p Ql; Qu; Q; Nl; Nu; N; Th; # A282721 - A282727

%t sum[p_]:= Total[If[#>p/2 && JacobiSymbol[#, p] != 1, #, 0]& /@ Range[p-1]];

%t sum /@ Select[Range[3, 1000, 8], PrimeQ] (* _Jean-Fran├žois Alcover_, Aug 31 2018 *)

%Y Cf. A282035-A282043 and A282721-A282727.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Feb 20 2017

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 June 17 04:45 EDT 2021. Contains 345080 sequences. (Running on oeis4.)