A033299 Smallest safe prime ((p-1)/2 is also prime) > n.
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
Keywords
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..10000
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