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.

Showing 1-6 of 6 results.

A187199 Parse the Kolakoski sequence A000002 into distinct phrases 1, 2, 21, 12, 122, 1221, 121, 12212, 11, ...; a(n) = length of n-th phrase.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 3, 5, 2, 3, 3, 4, 6, 3, 6, 4, 2, 5, 4, 6, 4, 3, 5, 7, 4, 5, 7, 5, 4, 6, 6, 5, 5, 6, 6, 4, 8, 5, 5, 9, 10, 7, 9, 8, 7, 5, 8, 11, 5, 6, 6, 7, 8, 7, 6, 6, 7, 7, 7, 9, 4, 4, 8, 8, 10, 5, 7, 8, 7, 9, 8, 12, 6, 10, 6, 8, 6, 10, 7, 9, 9, 8, 7, 8, 7, 9, 8, 7, 8, 8, 9, 9, 10, 8, 10, 9, 8, 11, 5, 6
Offset: 1

Views

Author

N. J. A. Sloane, Mar 06 2011

Keywords

Crossrefs

Programs

  • PARI
    \\ See Links section.

A376677 List of subwords (or factors) of the Kolakoski sequence (A000002).

Original entry on oeis.org

1, 2, 11, 12, 21, 22, 112, 121, 122, 211, 212, 221, 1121, 1122, 1211, 1212, 1221, 2112, 2121, 2122, 2211, 2212, 11211, 11212, 11221, 12112, 12122, 12211, 12212, 21121, 21122, 21211, 21221, 22112, 22121, 22122, 112112, 112122, 112212, 121121, 121122, 121221
Offset: 1

Views

Author

Rémy Sigrist, Oct 01 2024

Keywords

Comments

There are A007782(m) terms with m digits.

Crossrefs

Programs

  • PARI
    \\ See Links section.

A283511 Length of shortest prefix of the Kolakoski sequence K (A000002) containing all blocks of length n that appear in K.

Original entry on oeis.org

2, 5, 8, 22, 23, 25, 156, 157, 158, 159, 306, 356, 357, 358, 359, 360, 503, 690, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 3014, 4507, 6280, 7726, 7727, 7728, 7729, 7730, 7731, 7732, 7733, 7734, 7735, 16857, 16858, 16859, 30365, 30366, 30367, 30368, 30369, 30370, 30371, 30372, 30373, 30374, 30375
Offset: 1

Views

Author

Jeffrey Shallit, Mar 09 2017

Keywords

Examples

			The Kolakoski sequence contains 10 distinct blocks of length 4; the last to appear is 2121, which appears for the first time beginning at position 19 of K (indexing starting at position 1), so a prefix of length 22 contains all 10 length-4 subwords.
		

Crossrefs

A376638 a(n) is the number of n-digit numbers in A376637.

Original entry on oeis.org

2, 4, 4, 6, 8, 4, 12, 8, 8, 12, 20, 0, 16, 16, 12, 24, 16, 8, 12, 16, 32, 12, 20, 32, 24, 16, 16, 12, 16, 20, 40, 40, 8, 28, 44, 20, 44, 28, 20, 24, 20, 20, 16, 32, 20, 44, 44, 56, 28, 28, 20, 60, 52, 24, 56, 56, 20, 36, 36, 32, 24, 24, 32, 24, 16, 60, 16, 32
Offset: 1

Views

Author

Rémy Sigrist, Sep 30 2024

Keywords

Comments

All terms are even: if a word w belongs to A376637, then replacing 1's by 2's and 2's by 1's in w yields another word in A376637.
a(n)/2 is the number of terms of A376637 with digital sum n.

Examples

			Sequence A376637 begins: 1, 2,  11, 12, 21, 22,  112, 122, 211, 221,  1121.
So a(1) = 2, a(2) = 4, a(3) = 4.
		

Crossrefs

A283512 Last block of length-n to appear for the first time in the Kolakoski sequence K (A000002).

Original entry on oeis.org

2, 11, 212, 2121, 21211, 121121, 2212212, 22122121, 221221211, 2212212112, 22122121122, 112212211211, 1122122112112, 11221221121121, 112212211211212, 1122122112112122, 11211212212211211, 112212211211212211, 1211212212112212212, 12112122121122122121, 121121221211221221211
Offset: 1

Views

Author

Jeffrey Shallit, Mar 09 2017

Keywords

Examples

			For n = 4 the last block of length 4 to appear is 2121.
		

Crossrefs

A379017 a(n) is the number of distinct sums s(m) + s(m+1) + ... + s(m+n-1), where s = A000002, and m >= 1.

Original entry on oeis.org

2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 4, 3, 4, 5, 4, 3, 4, 3, 4, 5, 4, 5, 6, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 5, 6, 5, 4, 5, 6, 5, 6, 7, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 6, 5, 6, 5, 6, 5, 6, 7, 6, 5, 6, 5, 6, 7, 6, 7, 6, 5, 6, 7, 6, 7, 8, 7, 8, 7, 6, 7
Offset: 1

Views

Author

Clark Kimberling, Dec 16 2024

Keywords

Examples

			Starting with s = (1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, ...) we form a shifted partial sum array:
(row 1) = (1,2,2,1,1,2,1,2,2,...)
(row 2) = (s(1)+s(2), s(2)+s(3), s(3)+s(4), ...) = (3,4,3,2,3,3,3,4,...) = A333229
(row 3) = (s(1)+s(2)+s(3), s(2)+s(3)+s(4), s(3)+s(4)+s(5), ...) = (5,5,4,4,4,5,5,5,5,5,5,4,...)
The number of distinct numbers in (row 3) is 2, so a(3) = 2.
The first 12 rows of the shifted partial sum array: (1, 2), (2, 3, 4), (4, 5), (5, 6, 7), (6, 7, 8, 9), (8, 9, 10), (9, 10, 11, 12), (11, 12, 13), (13, 14), (14, 15, 16), (15, 16, 17, 18), (17, 18, 19). These rows illustrate that fact that the integers in each row are consecutive.
		

Crossrefs

Cf. A000002, A007782 (subword complexity), A283511, A333229, A376677.

Programs

  • Mathematica
    s = Prepend[Nest[Flatten[Partition[#, 2] /. {{2, 2} -> {2, 2, 1, 1}, {2, 1} -> {2, 2, 1}, {1, 2} -> {2, 1, 1}, {1, 1} -> {2, 1}}] &, {2, 2}, 24], 1]; (* A000002 *)
    Length[s]
    r[1] = s;
    r[n_] := r[n] = Rest[r[n - 1]];
    c[n_] := c[n] = Take[r[n], 1000];
    sum[n_] := Sum[c[k], {k, 1, n}];
    t = Table[Union[sum[n]], {n, 1, 100}]
    Map[Length, t]

Formula

|a(n+1)-a(n)| = 1 for every n.

Extensions

More terms from Jinyuan Wang, Jan 22 2025
Showing 1-6 of 6 results.