[go: up one dir, main page]

login
A364454
Smallest k such that 6^(6^n) - k is prime.
2
1, 7, 35, 587, 629, 1819, 106843
OFFSET
0,2
COMMENTS
This is to 6 as A058220 is to 2 and A140331 is to 3.
EXAMPLE
a(2) = 35 because 6^(6^2) - 35 = 10314424798490535546171949021 is prime.
MATHEMATICA
lst={}; Do[Do[p=6^(6^n)-k; If[PrimeQ[p], AppendTo[lst, k]; Break[]], {k, 2, 11!}], {n, 7}]; lst
Table[k=1; Monitor[Parallelize[While[True, If[PrimeQ[6^(6^n)-k], Break[]]; k++]; k], k], {n, 1, 7}]
y[n_] := Module[{x = 6^(6^n)}, x - NextPrime[x, -1]]; Array[y, 7]
PROG
(PARI) a(n) = my(x = 6^(6^n)); x - precprime(x);
CROSSREFS
KEYWORD
more,nonn
AUTHOR
EXTENSIONS
a(6) from Michael S. Branicky, Aug 23 2024
a(0)=1 prepended by Alois P. Heinz, Aug 23 2024
STATUS
approved