login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A364453
Smallest k such that 5^(5^n) - k is prime.
2
2, 4, 64, 124, 228, 10978, 73738, 66346
OFFSET
0,1
COMMENTS
This is to 5 as A058220 is to 2 and A140331 is to 3.
a(7) > 5487.
FORMULA
a(n) = A064722(A137841(n)).
EXAMPLE
a(2) = 64 because 5^(5^2) - 64 = 298023223876953061 is prime.
MATHEMATICA
lst={}; Do[Do[p=5^(5^n)-k; If[PrimeQ[p], AppendTo[lst, k]; Break[]], {k, 2, 11!}], {n, 7}]; lst
Table[k=1; Monitor[Parallelize[While[True, If[PrimeQ[5^(5^n)-k], Break[]]; k++]; k], k], {n, 1, 7}]
y[n_] := Module[{x = 5^(5^n)}, x - NextPrime[x, -1]]; Array[y, 7]
PROG
(PARI) a(n) = my(x = 5^(5^n)); x - precprime(x);
CROSSREFS
KEYWORD
more,nonn
AUTHOR
EXTENSIONS
a(0) prepended and a(7) from Michael S. Branicky, Aug 24 2024
STATUS
approved