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.

A033299 Smallest safe prime ((p-1)/2 is also prime) > n.

Original entry on oeis.org

5, 5, 5, 5, 7, 7, 11, 11, 11, 11, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 83, 83, 83, 83, 83, 83, 83, 83, 83
Offset: 1

Views

Author

Keywords

Programs

  • Maple
    with(numtheory); safeprime(n);
  • Python
    from sympy import isprime, nextprime
    def a(n):
      p = nextprime(n)
      while not isprime((p-1)//2): p = nextprime(p)
      return p
    print([a(n) for n in range(1, 68)]) # Michael S. Branicky, May 05 2021

Extensions

a(57) and beyond from Michael S. Branicky, May 05 2021