login
A377724
Smallest k such that 4^(5*4^n) - k is a safe prime.
0
5, 437, 13709, 40169, 574133
OFFSET
0,1
COMMENTS
a(5) > 2*10^7. - Michael S. Branicky, Nov 09 2024
MATHEMATICA
Table[m = 4;
k = 0; Monitor[
Parallelize[
While[True,
If[And[PrimeQ[m^((m + 1)*m^n) - k],
PrimeQ[((m^((m + 1)*m^n) - k) - 1)/2]], Break[]]; k++]; k], k], {n, 0, 5}]
PROG
(PARI) a(n) = {my(k=0); while (!(isprime(p=4^(5*4^n) - k) && isprime((p-1)/2)), k++); k; }
(Python)
from sympy import isprime, prevprime
def A(n):
m = 4**(5*4**n)
p = prevprime(m)
while not isprime((p-1)//2):
p = prevprime(p)
return m-p #
CROSSREFS
KEYWORD
nonn,more
AUTHOR
STATUS
approved