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!)
A282036 a(n) is the sum of quadratic nonresidues of A002145(n) (the n-th prime == 3 mod 4). 7
2, 14, 33, 95, 161, 279, 473, 658, 944, 1139, 1491, 1738, 1826, 2884, 2996, 4318, 4585, 5004, 6191, 6683, 7849, 8413, 10314, 10746, 11394, 13157, 13393, 16013, 16566, 18936, 19783, 20376, 23946, 27057, 27804, 30883, 35541, 35232, 36384, 39832, 45671, 50858, 51363, 50059, 55097, 56040 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Christian Aebi, Grant Cairns, Sums of Quadratic residues and nonresidues, arXiv:1512.00896 [math.NT], 2015.
FORMULA
a(n) = Sum_{k=1..(A002145(n)-1)/2} (-k^2) mod A002145(n). - J. M. Bergot and Robert Israel, Nov 09 2020
MAPLE
with(numtheory):
a:=[]; m:=[]; d:=[];
for i1 from 1 to 200 do
p:=ithprime(i1);
if (p mod 4) = 3 then
sp:=0; sm:=0;
for j from 1 to p-1 do
if legendre(j, p)=1 then sp:=sp+j; else sm:=sm+j; fi; od;
a:=[op(a), sp]; m:=[op(m), sm]; d:=[op(d), sm-sp];
fi;
od:
a; m; d; # A282035, A282036, A282037
# Alternative:
f:= p -> add(-k^2 mod p, k=1..(p-1)/2)::
map(f, select(isprime, [seq(p, p=3..1000, 4)])); # Robert Israel, Nov 09 2020
MATHEMATICA
f[p_] := Total[Range[p-1] ~Complement~ Table[Mod[k^2, p], {k, (p-1)/2}] ]; f /@ Select[Range[3, 1000, 4], PrimeQ] (* Jean-François Alcover, Feb 16 2018, after Robert Israel *)
PROG
(PARI) lista(nn) = forprime(p=2, nn, if(p%4==3, print1(sum(k=1, p-1, if (!issquare(Mod(k, p)), k)), ", "))); \\ Michel Marcus, Nov 09 2020
CROSSREFS
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.
Cf. A002145.
Sequence in context: A322074 A083015 A368628 * A050591 A073535 A225292
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 17:36 EDT 2024. Contains 371749 sequences. (Running on oeis4.)