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.

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