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.
%I A307486 #23 Apr 23 2019 10:59:04 %S A307486 3,3,3,2,4,3,3,3,2,2,2,2,2,2,3,2,2,2,2,2,3,2,2,2,2,3,2,2,2,2,2,2,2,2, %T A307486 2,2,2,2,2,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2,2, %U A307486 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,2,2,2 %N A307486 a(0) = 3; a(n) = smallest k > 1 such that 1 + a(0)*a(1)*...*a(n-1)*k is composite. %C A307486 a(n) = 4 for n = 4 and 39; a(n) = 3 for n = 0, 1, 2, 5, 6, 7, 14, 20, 25, 56, 90, 119, 316, 330, 1268, 1604, 1805, 1880, 1984, 2950, 3386, 3712, 4532, 4874, 8968, 18178, 19454, 23272, 45617, 51980, 52780, 60552, ...; a(n) = 2 for others n < 60552. Data from _Amiram Eldar_. %C A307486 Similar tails have sequences with other initial terms that are natural numbers. %C A307486 Conjecture: for any initial term a(0) > 0, a(n) > 3 only for finitely many n >= 0. %C A307486 The question is how to prove that all these sequences are bounded, so bounded? %C A307486 It seems that a(0) = 21 is the smallest initial term such that a(n) = 2 or 3 for every n > 0. %C A307486 Note that if a(0) is a Sierpinski number A076336, then a(n) = 2 for every n > 0. %C A307486 Carl Pomerance (in a letter to the author) wrote: Since the sequence a(0)a(1)...a(n-1) grows geometrically, the chance that any given k will give a prime is about 1/n, so the chance that both k = 2 and k = 3 will give primes is about 1/n^2, heuristically, which has a convergent sum. Thus, for this reason I would agree it's reasonable to conjecture that for any starting a(0), the sequence will eventually be made up of 2's and 3's, with 2's predominating. The number of 3's among the first n terms should be proportional to log n. %t A307486 a[0] = 3; a[n_] := a[n] = Module[{k = 2, p = Product[a[i], {i, 0, n - 1}]}, While[PrimeQ[1 + p*k], k++]; k]; Array[a, 100, 0] (* _Amiram Eldar_, Apr 10 2019 *) %o A307486 (PARI) p=1; for (n=0, 100, for (k=2, oo, if (!isprime(1+p*k), print1 (k", "); p*=k; break))) \\ _Rémy Sigrist_, Apr 23 2019 %Y A307486 Cf. A036012, A076336. %K A307486 nonn %O A307486 0,1 %A A307486 _Thomas Ordowski_, Apr 10 2019 %E A307486 More terms from _Amiram Eldar_, Apr 10 2019