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.

Showing 1-4 of 4 results.

A282043 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic nonresidues mod p.

Original entry on oeis.org

14, 161, 279, 658, 1491, 1738, 2884, 4318, 6191, 7849, 10314, 10746, 13157, 16013, 18936, 19783, 27057, 35541, 35232, 39832, 50858, 51363, 55097, 63228, 60875, 68408, 97038, 95906, 103484, 111931, 140205, 136676, 145628, 146445, 172830, 189614, 195038, 209332, 221373, 219641, 238849, 254597
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[];
    for i1 from 1 to 300 do
    p:=ithprime(i1);
    if (p mod 8) = 7 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
  • Mathematica
    sqnr[p_] := Select[Range[p-1], JacobiSymbol[#, p] != 1&] // Total;
    sqnr /@ Select[Prime[Range[200]], Mod[#, 8] == 7&] (* Jean-François Alcover, Aug 30 2018 *)

A282040 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic residues mod p that are > p/2.

Original entry on oeis.org

4, 59, 126, 285, 679, 953, 1706, 2675, 3709, 4269, 5551, 6480, 8488, 8858, 11194, 12212, 15103, 20665, 23511, 24153, 30197, 32733, 38458, 36913, 42643, 42032, 59638, 64987, 70396, 70887, 85606, 94192, 95522, 99930, 123090, 117932, 130367, 134436, 141262, 149395, 169769, 167663, 175469
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[];
    for i1 from 1 to 300 do
    p:=ithprime(i1);
    if (p mod 8) = 7 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
  • Mathematica
    sum[p_]:= Total[If[#>p/2 && JacobiSymbol[#, p] == 1, #, 0]& /@ Range[p-1]];
    sum /@ Select[Range[7, 1000, 8], PrimeQ] (* Jean-François Alcover, Aug 31 2018 *)

A282041 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic residues mod p.

Original entry on oeis.org

7, 92, 186, 423, 994, 1343, 2369, 3683, 5134, 6012, 7831, 8955, 11596, 12428, 15517, 16802, 21148, 28720, 31929, 33321, 41807, 44778, 51856, 51253, 57466, 57845, 82063, 88015, 95281, 97050, 117916, 127225, 130025, 135180, 165423, 161927, 176915, 183609, 193132, 202180, 228212, 228056, 236849
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[];
    for i1 from 1 to 300 do
        p:=ithprime(i1);
        if (p mod 8) = 7 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
  • Mathematica
    Table[Table[Mod[a^2, p], {a, 1, (p-1)/2}]//Total, {p, Select[Prime[Range[100]], Mod[#, 8] == 7 &]}] (* Vincenzo Librandi, Feb 21 2017 *)

A282042 Let p = n-th prime == 7 mod 8; a(n) = sum of quadratic nonresidues mod p that are > p/2.

Original entry on oeis.org

11, 128, 219, 520, 1176, 1348, 2221, 3310, 4766, 6106, 8034, 8271, 10049, 12443, 14613, 15193, 21012, 27486, 26814, 30664, 39248, 39318, 41699, 48888, 46052, 52595, 74613, 72878, 78599, 85768, 107895, 103643, 111125, 111195, 130497, 145619, 148490, 160159, 169503, 166856, 180406, 194204
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    Ql:=[]; Qu:=[]; Q:=[]; Nl:=[]; Nu:=[]; N:=[];
    for i1 from 1 to 300 do
    p:=ithprime(i1);
    if (p mod 8) = 7 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
  • Mathematica
    sum[p_]:= Total[If[#>p/2 && JacobiSymbol[#, p] != 1, #, 0]& /@ Range[p-1]];
    sum /@ Select[Range[7, 1000, 8], PrimeQ] (* Jean-François Alcover, Aug 31 2018 *)
Showing 1-4 of 4 results.