A364452 Smallest k such that 4^(4^n) - k is prime.
1, 5, 5, 159, 569, 1557, 2439, 25353, 24317, 164073
Offset: 0
Examples
a(2) = 5 because 4^(4^2) - 5 = 4294967291 is prime.
Programs
-
Mathematica
lst={};Do[Do[p=4^(4^n)-k;If[PrimeQ[p],AppendTo[lst,k];Break[]],{k,2,11!}],{n,7}];lst Table[k=1;Monitor[Parallelize[While[True,If[PrimeQ[4^(4^n)-k],Break[]];k++];k],k],{n,1,7}] y[n_] := Module[{x = 4^(4^n)}, x - NextPrime[x, -1]]; Array[y, 7]
-
PARI
a(n) = my(x = 4^(4^n)); x - precprime(x);
Formula
a(n) = A058220(2*n+1). - Michael S. Branicky, Aug 23 2024
Extensions
a(8) using search and a(9) using A058220 from Michael S. Branicky, Aug 23 2024
a(0) = 1 prepended by Michael S. Branicky, Apr 20 2025
Comments