OFFSET
1,2
COMMENTS
If s is finite, then s and T(s) have the same sum.
Fixed points of T correspond to sequences where each run, say of t's, has t elements; A001650, A001670, A002024, A130196, A167817, A175944 and A213083 are fixed points of T.
When s has no consecutive equal terms, then T(s) is all 1's (A000012).
Apparently, T^4(K) = T^2(K) (where T^i denotes the i-th iterate of K).
LINKS
Rémy Sigrist, PARI program for A306366
EXAMPLE
The first terms of the Kolakoski sequence are:
+-----+ +--+ +-----+ +-----+ +--
| | | | | | | | |
+--+ +-----+ +--+ +--+ +-----+
|#1|#2 |#3 |#4|#5|#6 |#7|#8 |#9 |#10 ...
+--+-----+-----+--+--+-----+--+-----+-----+--
1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, ...
.
The first terms of this sequence are:
+-----+--+ +-----+ +-----+--
| . | | | | .
+--+ . +-----+--+ +--+ .
|#1|#2 .#3|#4 .#5|#6 |#7|#8 .#9 ...
+--+-----+--+-----+--+-----+--+-----+--
1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, ...
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Rémy Sigrist, Feb 10 2019
STATUS
approved