editing
approved
editing
approved
Aebi, Christian, and Grant Cairns. "Sums of Quadratic residues and nonresidues." arXiv preprint arXiv:1512.00896 (2015).
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).
approved
editing
proposed
approved
editing
proposed
Needs a b-file
Vincenzo Librandi, <a href="/A282723/b282723.txt">Table of n, a(n) for n = 1..2500</a>
Table[Table[Mod[a^2, p], {a, 1, (p-1)/2}]//Total, {p, Select[Prime[Range[100]], Mod[#, 8] == 3 &]}] (* Vincenzo Librandi, Feb 21 2017 *)
approved
editing
editing
approved
qqq
Let p = n-th prime == 3 mod 8; a(n) = sum of quadratic residues mod p.
Needs a b-file
Aebi, Christian, and Grant Cairns. "Sums of Quadratic residues and nonresidues." arXiv preprint arXiv:1512.00896 (2015).
with(numtheory):
Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[]; Th:=[];
for i1 from 1 to 300 do
p:=ithprime(i1);
if (p mod 8) = 3 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];
Th:=[op(Th), q+ql];
fi;
od:
Cf. A282035-A282xxx.
approved
editing
editing
approved