A143589 Kolakoski fan based on A000034 with initial row 1.
1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 2, 1
Offset: 1
Examples
s=(1,2,1,2,1,2,1,2,...) and w=1, so the first 7 rows are 1 2 1 1 2 1 1 1 2 2 1 2 2 1 1 2 1 1 2 2
Formula
Introduced here is an array K called the "Kolakoski fan based on a sequence s with initial row w": suppose that s=(s(1),s(2),...) is a sequence of 1's and 2's and that w=(w(1),w(2),...) is a finite or infinite sequence of 1's and 2's. Assume that s(1)=w(1) and that if w(1)=1 then s contains at least one 2. Row 1 of the array K is w. Subsequent rows are defined inductively: the first term of row n is s(n) and the remaining terms are defined by Kolakoski substitution; viz., each number in row n-1 tells the string-length (1 or 2) of the next string in row n, each term being either 1 or 2.
Comments