# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a282039 Showing 1-1 of 1 %I A282039 #15 Nov 09 2020 20:34:03 %S A282039 3,33,60,138,315,390,663,1008,1425,1743,2280,2475,3108,3570,4323,4590, %T A282039 6045,8055,8418,9168,11610,12045,13398,14340,14823,15813,22425,23028, %U A282039 24885,26163,32310,33033,34503,35250,42333,43995,46548,49173,51870,52785,58443,60393,61380,66435,67470,70623 %N A282039 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic residues mod p that are < p/2. %H A282039 Robert Israel, Table of n, a(n) for n = 1..10000 %H A282039 Aebi, Christian, and Grant Cairns. Sums of Quadratic residues and nonresidues, arXiv preprint arXiv:1512.00896 (2015). %p A282039 with(numtheory): %p A282039 Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[]; %p A282039 for i1 from 1 to 300 do %p A282039 p:=ithprime(i1); %p A282039 if (p mod 8) = 7 then %p A282039 ql:=0; qu:=0; q:=0; nl:=0; nu:=0; n:=0; %p A282039 for j from 1 to p-1 do %p A282039 if legendre(j,p)=1 then %p A282039 q:=q+j; %p A282039 if j