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-2 of 2 results.

A054349 Successive generations of the variant of the Kolakoski sequence described in A042942.

Original entry on oeis.org

2, 22, 2211, 221121, 221121221, 22112122122112, 2211212212211211221211, 221121221221121122121121221121121, 2211212212211211221211212211211212212211212212112
Offset: 0

Views

Author

N. J. A. Sloane, May 07 2000

Keywords

Comments

For n >= 0, let f_1(n) be the number of 1's in a(n) (sequence begins: 0, 0, 2, 3, 4, 6, 11, 17, 24, ...) and f_2(n) be the number of 2's (sequence begins: 1, 2, 2, 3, 5, 8, 11, 16, 25, ...). Then there is a simple relation between f_1 and f_2, namely: f_1(n) = 1 - f_2(n) + f_2(n-1) + f_2(n-2) + ... + f_2(0). i.e. f_1(7) = 17 and 1 - f_2(7) + f_2(6) + ... + f_2(0) = 1 - 16 + 11 + 8 + 5 + 3 + 2 + 2 + 1 = 17. - Benoit Cloitre, Oct 11 2005

Crossrefs

Word lengths give A042942.

Extensions

More terms from David Wasserman, Mar 04 2002

A111123 Number of 2's in n-th "Kolakoski" string defined in A054349.

Original entry on oeis.org

1, 2, 2, 3, 5, 8, 11, 16, 25, 38, 57, 85, 127, 192, 289, 430, 644, 966, 1450, 2173, 3263, 4899, 7341, 11022, 16526, 24802, 37201, 55808, 83702, 125541, 188301, 282444, 423683, 635569, 953356, 1429969, 2144990, 3217454, 4826176, 7239129, 10858479, 16287972, 24431890
Offset: 0

Views

Author

Benoit Cloitre, Oct 16 2005

Keywords

Comments

Also the number of terms in n-th string (starting from n=3) when representing A000002 as a tree. Each branch of this tree is a string. Starting from n=3, each 1 in n-th string generates either 1 or 2 in (n+1)-th string and each 2 in n-th string generates either 11 or 22 in (n+1)-th string based on the previously generated term of either 2 or 1. Hence, the number of terms in (n+1)-th string is the sum of all terms in n-th string. - Rakesh Khanna A, May 24 2020

Crossrefs

Cf. A001083, A042942, A054349, A111124 (number of 1's).

Programs

  • Mathematica
    l = { (*terms in A042942*) }; For[i = 2, i <= Length[l], i++, Print[l[[i]] - l[[i - 1]]]]

Formula

a(0) + a(1) + ... + a(n) = A042942(n+2) - 1.
a(n) = A001083(n+4) - A001083(n+3). - Benoit Cloitre, Nov 07 2010

Extensions

More terms from and offset changed to 0 by Jinyuan Wang, Apr 03 2020
Showing 1-2 of 2 results.