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.

Original entry on oeis.org

2, 3, 6, 4, 12, 10, 16, 12, 16, 24, 26, 24, 30, 28, 28, 44, 36, 42, 20, 38, 34, 54, 54, 56, 48, 44, 50, 52, 68, 56, 56, 60, 62, 66, 66, 70, 76, 84, 76, 58, 92, 90, 88, 90, 80, 88, 92, 102, 104, 102, 114, 104, 108, 98, 114, 108, 92, 100, 120, 126, 124, 130, 126, 142, 116, 126
Offset: 0

Views

Author

Keywords

Examples

			The array of sequences begins
k= 0: 2, 1, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, ...,.
k= 1: 1, 3, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, ...,.
k= 2: 1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, ...,.
k= 3: 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, ...,.
k= 4: 1, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, ...,.
k= 5: 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, 28, ...,.
		

Crossrefs

Programs

  • Mathematica
    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}]

Extensions

Offset changed to 0 by Chai Wah Wu, Aug 27 2017