login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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. 1
1, 5, 17, 317, 5297, 3449, 41213, 59057, 468857, 1503317, 1103717, 40207829, 154474973 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

Table of n, a(n) for n=0..12.

EXAMPLE

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

PROG

(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

(Python)

from sympy import isprime, prevprime

def A335313(n):

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

    p = prevprime(m)

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

        p = prevprime(p)

    return m-p # Chai Wah Wu, Jul 09 2020

CROSSREFS

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

Sequence in context: A274002 A286678 A081479 * A318751 A096996 A256236

Adjacent sequences:  A335310 A335311 A335312 * A335314 A335315 A335316

KEYWORD

nonn,more

AUTHOR

Artsiom Palkounikau, Jun 01 2020

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 07:19 EDT 2021. Contains 347469 sequences. (Running on oeis4.)