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!)
A360081 Smallest k such that 2^(3*2^n) + k is a safe prime. 2
3, 19, 31, 691, 907, 2887, 15943, 69283, 216127, 1108831, 8344423, 10976347, 166965391, 385465771, 26580643 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
a(n) == 3 (mod 4). - Chai Wah Wu, Jan 27 2023
LINKS
FORMULA
a(n) = A350696(3*2^n).
EXAMPLE
a(1) = 19 because 2^(3*2^1)+19 = 2^6+19 = 83 is the smallest safe prime greater than 64.
PROG
(PARI) a(n) = {my(k=1); pow2 = 2^(3*2^n); while (!(isprime(pow2 + k) && isprime((pow2 + k - 1)/2)), k+=2); k; } \\
(Python)
from sympy import isprime, nextprime
def A360081(n):
m = 1<<3*(1<<n)-1
i = m
while i:=nextprime(i):
if isprime(k:=(i<<1)+1):
return k-(m<<1) # Chai Wah Wu, Jan 27 2023
CROSSREFS
Sequence in context: A162307 A128069 A056246 * A061427 A069516 A098856
KEYWORD
nonn,more,hard
AUTHOR
Mark Andreas, Jan 25 2023
STATUS
approved

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 19 07:38 EDT 2024. Contains 371782 sequences. (Running on oeis4.)