cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A286982 #33 Jun 15 2017 17:15:12
%S A286982 6,3,5,2,1,54131988
%N 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.
%e A286982 a(1) = 6 because (1 + 6)^(2^1) + 6 = 55 is semiprime and (1 + 6)^(2^0) + 6 = 13 is prime;
%e A286982 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;
%e A286982 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;
%e A286982 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;
%e A286982 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);
%e A286982 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.
%t A286982 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 *)
%Y A286982 Cf. A019434, A047845, A057726, A160027, A286680.
%K A286982 nonn,more
%O A286982 1,1
%A A286982 _Juri-Stepan Gerasimov_, May 12 2017
%E A286982 a(6) from _Robert G. Wilson v_, May 14 2017