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.

A122866 Consider the array of sequences defined to be "the least previously nonoccurring positive integer such that partial sum + k is prime" beginning with k=0. This sequence is the main diagonal of that array.

This page as a plain text file.
%I A122866 #10 Aug 28 2017 13:18:07
%S A122866 2,3,6,4,12,10,16,12,16,24,26,24,30,28,28,44,36,42,20,38,34,54,54,56,
%T A122866 48,44,50,52,68,56,56,60,62,66,66,70,76,84,76,58,92,90,88,90,80,88,92,
%U A122866 102,104,102,114,104,108,98,114,108,92,100,120,126,124,130,126,142,116,126
%N A122866 Consider the array of sequences defined to be "the least previously nonoccurring positive integer such that partial sum + k is prime" beginning with k=0. This sequence is the main diagonal of that array.
%H A122866 Chai Wah Wu, <a href="/A122866/b122866.txt">Table of n, a(n) for n = 0..10000</a>
%e A122866 The array of sequences begins
%e A122866 k= 0: 2, 1, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, ...,.
%e A122866 k= 1: 1, 3, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, ...,.
%e A122866 k= 2: 1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, ...,.
%e A122866 k= 3: 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, ...,.
%e A122866 k= 4: 1, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, ...,.
%e A122866 k= 5: 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, 28, ...,.
%t A122866 f[s_] := Append[s, k = 1; p = q + Plus @@ s; While[MemberQ[s, k] || !PrimeQ[p + k], k++ ]; k]; T[n_, k_] := Nest[q = k; f, {}, n][[ -1]]; Table[T[n, n - 1], {n, 66}]
%Y A122866 Cf. A054408, A121861, A121862, A122867.
%K A122866 nonn
%O A122866 0,1
%A A122866 _Jonathan Vos Post_ and _Robert G. Wilson v_, Sep 15 2006
%E A122866 Offset changed to 0 by _Chai Wah Wu_, Aug 27 2017