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-10 of 11 results. Next

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 *)

A282721 Let p = n-th prime == 3 mod 8; a(n) = sum of quadratic residues mod p that are < p/2.

Original entry on oeis.org

1, 13, 32, 137, 306, 314, 555, 876, 1400, 1416, 1742, 2450, 3099, 3788, 4816, 5430, 6351, 7344, 8393, 9546, 12858, 13373, 15265, 17277, 16311, 18403, 19521, 22344, 21805, 23590, 25495, 26805, 30767, 30863, 31570, 35980, 40678, 43946, 45640, 49124, 50055, 52776, 58418, 66210, 71521, 71665, 83666, 81628
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    s[p_] := Total[Select[Range[Floor[p/2]], JacobiSymbol[#, p] == 1&]];
    s /@ Select[Range[3, 2000, 8], PrimeQ] (* Jean-François Alcover, Nov 17 2017 *)
  • Python
    from sympy import isprime
    def a(p):
        r=(p - 1)//2
        t=0
        for j in range(1, r + 1):
            q=(j**2)%p
            if q<=r:t+=q
        return t
    print([a(p) for p in range(3, 2001, 8) if isprime(p)]) # Indranil Ghosh, Mar 27 2017, translated from Maple code

A282039 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

3, 33, 60, 138, 315, 390, 663, 1008, 1425, 1743, 2280, 2475, 3108, 3570, 4323, 4590, 6045, 8055, 8418, 9168, 11610, 12045, 13398, 14340, 14823, 15813, 22425, 23028, 24885, 26163, 32310, 33033, 34503, 35250, 42333, 43995, 46548, 49173, 51870, 52785, 58443, 60393, 61380, 66435, 67470, 70623
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[#

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 *)

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

Original entry on oeis.org

0, 9, 44, 293, 461, 758, 1022, 1799, 2530, 3171, 4778, 5068, 7662, 8470, 9993, 14097, 16674, 19467, 20755, 25701, 29042, 34471, 37506, 40661, 45066, 48541, 54324, 54224, 58135, 60351, 68593, 75432, 74014, 83881, 85900, 98518, 112000, 117443, 122241, 132125, 143322, 151299, 163180, 161975, 181191
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    b[1] = 3; b[n_] := b[n] = Module[{p}, p = NextPrime[b[n - 1]]; While[Mod[p, 8] != 3, p = NextPrime[p]]; p];
    a[n_] := Module[{p, q, r}, p = b[n]; q = 0; For[r = (p + 1)/2, r <= p, r++, If[KroneckerSymbol[r, p] == 1, q = q + r]]; q];
    Array[a, 45] (* Jean-François Alcover, Nov 27 2017, after R. J. Mathar *)

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

Original entry on oeis.org

1, 22, 76, 430, 767, 1072, 1577, 2675, 3930, 4587, 6520, 7518, 10761, 12258, 14809, 19527, 23025, 26811, 29148, 35247, 41900, 47844, 52771, 57938, 61377, 66944, 73845, 76568, 79940, 83941, 94088, 102237, 104781, 114744, 117470, 134498, 152678, 161389, 167881, 181249, 193377, 204075, 221598, 228185
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)

A282724 Let p = n-th prime == 3 mod 8; a(n) = sum of quadratic nonresidues mod p that are < p/2.

Original entry on oeis.org

0, 2, 13, 94, 129, 247, 306, 555, 745, 999, 1579, 1555, 2466, 2653, 3059, 4581, 5430, 6351, 6658, 8409, 9087, 11158, 11996, 12858, 14814, 15788, 17880, 17277, 18950, 19481, 22400, 24876, 23518, 27448, 28115, 32285, 36743, 38269, 39851, 43111, 47406, 50055, 53683, 51645, 58274, 66410, 65119, 76013, 80465
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    b[1] = 3; b[n_] := b[n] = Module[{p}, p = NextPrime[b[n - 1]]; While[Mod[p, 8] != 3, p = NextPrime[p]]; p];
    a[n_] := Module[{p, q, r}, p = b[n]; q = 0; For[r = 1, r <= (p - 1)/2, r++, If[KroneckerSymbol[r, p] != 1, q = q + r]]; q];
    Array[a, 50] (* Jean-François Alcover, Nov 27 2017, after R. J. Mathar *)

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

Original entry on oeis.org

2, 33, 95, 473, 944, 1139, 1826, 2996, 4585, 5004, 6683, 8413, 11394, 13393, 16566, 20376, 23946, 27804, 30883, 36384, 45671, 50059, 56040, 62357, 62874, 69559, 75486, 81635, 82795, 88050, 97183, 104166, 112030, 118159, 120925, 138193, 156613, 167066, 173670, 187262, 196026, 206796, 226333, 242750
Offset: 1

Views

Author

N. J. A. Sloane, Feb 20 2017

Keywords

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    Table[Table[Mod[a^2, p/2], {a, 1, (p-1)}]//Total, {p, Select[Prime[ Range[ 200]], Mod[#, 8] == 3 &]}] (* Vincenzo Librandi, Feb 22 2017 *)
Showing 1-10 of 11 results. Next