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-3 of 3 results.

A096634 Let p = n-th prime == 5 (mod 8) (A007521); a(n) = smallest prime q such that p is not a square mod q.

Original entry on oeis.org

3, 5, 3, 5, 3, 7, 3, 11, 3, 5, 3, 7, 3, 7, 3, 5, 3, 3, 7, 5, 3, 5, 13, 3, 3, 11, 3, 5, 3, 7, 3, 3, 13, 5, 5, 3, 3, 3, 7, 5, 5, 3, 5, 3, 7, 3, 7, 5, 3, 5, 3, 5, 3, 5, 3, 3, 3, 11, 11, 5, 3, 13, 5, 3, 17, 3, 7, 5, 3, 3, 7, 11, 7, 3, 3, 5, 3, 3, 3, 7, 5, 3, 3, 3, 11, 3, 13, 5, 3, 3, 7, 3, 3, 11, 5, 3, 3, 5, 3
Offset: 1

Views

Author

Robert G. Wilson v, Jun 24 2004

Keywords

Crossrefs

Programs

  • Maple
    g:= proc(n) local p;
      p:= 1;
      do
        p:= nextprime(p);
        if numtheory:-quadres(n,p) = -1 then return p fi
      od
    end proc:
    map(g, select(isprime, [seq(i,i=5..10000,8)])); # Robert Israel, Apr 17 2023
  • Mathematica
    f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; f /@ Select[ Prime[ Range[435]], Mod[ #, 8] == 5 &]

A094929 Let p = n-th prime; a(n) = smallest odd prime q such that p is not a square mod q.

Original entry on oeis.org

3, 5, 3, 5, 3, 7, 3, 3, 7, 5, 3, 5, 3, 3, 3, 7, 5, 3, 5, 11, 3, 3, 5, 3, 5, 3, 11, 3, 5, 3, 3, 7, 3, 11, 5, 5, 3, 3, 3, 7, 3, 5, 3, 7, 11, 5, 3, 7, 3, 3, 7, 3, 3, 3, 3, 7, 5, 3, 5, 3, 5, 3, 5, 3, 13, 5, 3, 7, 3, 3, 5, 5, 13, 3, 3, 5, 3, 7, 3, 13, 3, 5, 7, 3, 3, 5, 3, 5, 3, 3, 5, 3, 13, 3, 3, 3, 5, 11, 5
Offset: 3

Views

Author

N. J. A. Sloane, Jun 19 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; f /@ Prime[Range[3, 100]] (* Robert G. Wilson v, Jun 24 2004 *)
  • PARI
    a(n) = {my(p=prime(n), q=3); while (!issquare(Mod(p, q)), q = nextprime(q+1)); q;} \\ Michel Marcus, May 06 2019

A096640 Smallest prime p == 7 mod 8 (A007521) and p > prime(n+2) such that p is a quadratic residue mod the first n odd primes 3, 5, 7, 11, ..., prime(n+1), and p is a quadratic non-residue mod prime(n+2).

Original entry on oeis.org

23, 7, 31, 79, 631, 751, 2311, 21319, 48799, 82471, 256279, 78439, 1768831, 1365079, 2631511, 1427911, 4355311, 5715319, 49196359, 117678031, 180628639, 475477759, 452980999
Offset: 0

Views

Author

Robert G. Wilson v, Jun 24 2004

Keywords

Comments

Same as smallest prime p == 7 mod 8 with the property that the Legendre symbol (p|q) = 1 for the first n odd primes q = prime(k+1), k = 1, 2, ..., n, and (p|q) = -1 for q = prime(n+2).

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 2}, While[ JacobiSymbol[n, Prime[k]] == 1, k++ ]; Prime[k]]; t = Table[0, {50}]; Do[p = Prime[n]; If[Mod[p, 8] == 7, a = f[p]; If[ t[[ PrimePi[a]]] == 0, t[[ PrimePi[a]]] = p; Print[ PrimePi[a], " = ", p]]], {n, 10^9}]; t

Extensions

Better name from Jonathan Sondow, Mar 07 2013
Showing 1-3 of 3 results.