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!)
A335313 Smallest k such that 2^(3*2^n) - k is a safe prime. 5

%I #49 Jun 06 2022 11:23:24

%S 1,5,17,317,5297,3449,41213,59057,468857,1503317,1103717,40207829,

%T 154474973,1162354373,18153497

%N Smallest k such that 2^(3*2^n) - k is a safe prime.

%e a(1) = 5 because 2^(3*2^1)-5 = 2^6-5 = 59 is the largest safe prime less than 64.

%o (PARI) a(n) = {my(k=0); while (!(isprime(p=2^(3*2^n) - k) && isprime((p-1)/2)), k++); k;} \\ _Michel Marcus_, Jun 01 2020

%o (Python)

%o from sympy import isprime, prevprime

%o def A335313(n):

%o m = 2**(3*2**n)

%o p = prevprime(m)

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

%o p = prevprime(p)

%o return m-p # _Chai Wah Wu_, Jul 09 2020

%Y Cf. A005385 (safe primes), A057821, A181356.

%K nonn,more

%O 0,2

%A _Artsiom Palkounikau_, Jun 01 2020

%E a(13) from _Artsiom Palkounikau_, Oct 13 2021

%E a(14) from _Mark Andreas_, Jun 06 2022

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 15:11 EDT 2024. Contains 371794 sequences. (Running on oeis4.)