A369378 a(n) is the smallest k such that 2^(2^n+1)-1 + 2^k is prime, or -1 if no such k exists.
1, 2, 4, 16, 1968, 64, 64
Offset: 0
Examples
a(1) = 2 since for 2^(2^1+1)-1 = 7 we have 7 + 2^1 = 9 and 7 + 2^2 = 11 is prime.
Programs
-
Mathematica
a[n_] := Module[{m = 2^(2^n + 1) - 1, k = 1}, While[! PrimeQ[m + 2^k], k++]; k]; Array[a, 7, 0] (* Amiram Eldar, Jan 22 2024 *)
Comments