login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A033299 Smallest safe prime ((p-1)/2 is also prime) > n. 4

%I #7 May 05 2021 17:01:11

%S 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,

%T 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,59,59,

%U 59,59,59,59,59,59,59,59,59,59,83,83,83,83,83,83,83,83,83

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

%H Michael S. Branicky, <a href="/A033299/b033299.txt">Table of n, a(n) for n = 1..10000</a>

%p with(numtheory); safeprime(n);

%o (Python)

%o from sympy import isprime, nextprime

%o def a(n):

%o p = nextprime(n)

%o while not isprime((p-1)//2): p = nextprime(p)

%o return p

%o print([a(n) for n in range(1, 68)]) # _Michael S. Branicky_, May 05 2021

%K nonn

%O 1,1

%A _N. J. A. Sloane_.

%E a(57) and beyond from _Michael S. Branicky_, May 05 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 20 11:10 EDT 2024. Contains 371838 sequences. (Running on oeis4.)