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”).

A286982
Smallest nonnegative k such that (1 + k)^(2^n) + k is not prime and all (1 + k)^(2^j) + k, for 0 <= j < n, are primes.
1
6, 3, 5, 2, 1, 54131988
OFFSET
1,1
EXAMPLE
a(1) = 6 because (1 + 6)^(2^1) + 6 = 55 is semiprime and (1 + 6)^(2^0) + 6 = 13 is prime;
a(2) = 3 because (1 + 3)^(2^2) + 3 = 259 is semiprime and both (1 + 3)^(2^0) + 3 = 7 and (1 + 3)^(2^1) + 3 = 19 are primes;
a(3) = 5 because (1 + 5)^(2^3) + 5 = 167921 is semiprime and (1 + 5)^(2^0) + 5 = 11, (1 + 5)^(2^1) + 5 = 41 and (1 + 5)^(2^2) + 5 = 1301 are all primes;
a(4) = 2 because (1 + 2)^(2^4) + 2 = 43046723 is semiprime and (1 + 2)^(2^0) + 2 = 5, (1 + 2)^(2^1) + 2 = 11, (1 + 2)^(2^2) + 2 = 83 and (1 + 2)^(2^3) + 2 = 6563 are all primes;
a(5) = 1 because (1 + 1)^(2^5) + 1 = 4294967297 is semiprime and (1 + 1)^(2^0) + 1 = 3, (1 + 1)^(2^1) + 1 = 5, (1 + 1)^(2^2) + 1 = 17, (1 + 1)^(2^3) + 1 = 257 and (1 + 1)^(2^4) + 1 = 65537 are fix known Fermat primes (A019434);
a(6) = 54131988 because (1 + 54131988)^(2^6) + 54131988 is composite and (1 + 54131988)^(2^0) + 54131988 = 108263977, (1 + 54131988)^(2^1) + 54131988 = 2930272287228109, (1 + 54131988)^(2^2) + 54131988 = 8586495360054127683625679378629, (1 + 54131988)^(2^3) + 54131988 = 73727902568231063808600888120898279950965368674840612135914869, (1 + 54131988)^(2^4) + 54131988 and (1 + 54131988)^(2^5) + 54131988 are all primes.
MATHEMATICA
a[n_] := Block[{k = 1}, While[PrimeQ[(1 + k)^(2^n) + k] || ! AllTrue[(1 + k)^(2^Range[0, n-1]) + k, PrimeQ], k++]; k]; Array[a, 5] (* Giovanni Resta, May 30 2017 *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(6) from Robert G. Wilson v, May 14 2017
STATUS
approved