login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Smallest k such that 4^(4^n) - k is prime.
2

%I #25 Aug 23 2024 08:37:56

%S 5,5,159,569,1557,2439,25353,24317,164073

%N Smallest k such that 4^(4^n) - k is prime.

%C This is to 4 as A058220 is to 2 and A140331 is to 3.

%C a(8) > 22174.

%F a(n) = A064722(A137840(n)).

%F a(n) = A058220(2*n+1). - _Michael S. Branicky_, Aug 23 2024

%e a(2) = 5 because 4^(4^2) - 5 = 4294967291 is prime.

%t lst={};Do[Do[p=4^(4^n)-k;If[PrimeQ[p],AppendTo[lst,k];Break[]],{k,2,11!}],{n,7}];lst

%t Table[k=1;Monitor[Parallelize[While[True,If[PrimeQ[4^(4^n)-k],Break[]];k++];k],k],{n,1,7}]

%t y[n_] := Module[{x = 4^(4^n)}, x - NextPrime[x, -1]]; Array[y, 7]

%o (PARI) a(n) = my(x = 4^(4^n)); x - precprime(x);

%Y Cf. A064722, A137840.

%Y Cf. A058220, A140331, A364453, A364454.

%K more,nonn

%O 1,1

%A _J.W.L. (Jan) Eerland_, Jul 25 2023

%E a(8) using search and a(9) using A058220 from _Michael S. Branicky_, Aug 23 2024