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.

A204911 The prime q>=5 such that n divides p-q, where p>q is the least prime for which such a prime q exists.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jan 20 2012

Keywords

Comments

For a guide to related sequences, see A204892.

Crossrefs

Programs

  • Maple
    f:= proc(n) local V,q,r;
      V:= Array(0..n-1); q:= 4;
      do
       q:= nextprime(q);
       r:= q mod n;
       if V[r] = 0 then V[r]:= q
       else return V[r]
       fi
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jul 24 2018
  • Mathematica
    (See the program at A204908.)
  • Python
    from sympy import nextprime
    def a(n):
        V, q = [0 for _ in range(n)], 4
        while True:
            q = nextprime(q)
            r = q%n
            if V[r] == 0: V[r] = q
            else: return int(V[r])
    print([a(n) for n in range(1, 94)]) # Michael S. Branicky, Jun 25 2024 after Robert Israel

Extensions

More terms from Robert G. Wilson v, Jul 24 2018