cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A282037 Let p = n-th prime == 3 mod 4; a(n) = (sum of quadratic nonresidues mod p) - (sum of quadratic residues mod p).

Original entry on oeis.org

1, 7, 11, 19, 69, 93, 43, 235, 177, 67, 497, 395, 249, 515, 321, 635, 655, 417, 1057, 163, 1837, 895, 2483, 1791, 633, 1561, 1135, 3585, 1757, 3419, 2981, 849, 921, 5909, 993, 1735, 6821, 3303, 1137, 6511, 3771, 9051, 6585, 2215, 3241, 3269, 11975, 3409, 4419, 1497, 10563, 2615, 1641, 5067, 2855
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Comments

Equals A282036 - A282035.

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.

Programs

  • 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
  • Mathematica
    sum[p_] := Total[If[JacobiSymbol[#, p] == 1, -#, #]& /@ Range[p-1]];
    sum /@ Select[Prime[Range[200]], Mod[#, 4] == 3&] (* Jean-François Alcover, Aug 31 2018 *)