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!)
A282035 Sum of quadratic residues of (n-th prime == 3 mod 4). 19

%I #13 Apr 07 2017 13:12:19

%S 1,7,22,76,92,186,430,423,767,1072,994,1343,1577,2369,2675,3683,3930,

%T 4587,5134,6520,6012,7518,7831,8955,10761,11596,12258,12428,14809,

%U 15517,16802,19527,23025,21148,26811,29148,28720,31929,35247,33321,41900,41807,44778,47844,51856,52771,51253,57466

%N Sum of quadratic residues of (n-th prime == 3 mod 4).

%H Vincenzo Librandi, <a href="/A282035/b282035.txt">Table of n, a(n) for n = 1..5000</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 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 Table[Table[Mod[a^2, p], {a, 1, (p-1)/2}]//Total, {p, Select[Prime[Range[100]], Mod[#, 4]==3 &]}] (* _Vincenzo Librandi_, Feb 21 2017 *)

%o (PARI) do(p)=sum(k=1,p-1,k^2%p)/2

%o apply(do, select(p->p%4==3, primes(100))) \\ _Charles R Greathouse IV_, Feb 21 2017

%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

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)