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.
%I A306366 #19 Feb 15 2021 02:02:47 %S A306366 1,2,2,2,1,1,1,2,2,1,2,2,2,1,1,2,2,2,1,1,1,2,1,1,1,2,2,2,1,1,2,1,1,1, %T A306366 2,2,1,2,2,2,1,1,1,2,2,1,1,1,2,1,1,2,2,2,1,2,2,2,1,1,1,2,2,1,2,2,2,1, %U A306366 1,2,1,1,1,2,2,1,1,1,2,2,2,1,2,2,2,1,1 %N A306366 For any sequence s of positive integers without infinitely many consecutive equal terms, let T(s) be the sequence obtained by replacing each run, say of k consecutive t's, with a run of t consecutive k's; this sequence corresponds to T(K) (where K denotes the Kolakoski sequence A000002). %C A306366 If s is finite, then s and T(s) have the same sum. %C A306366 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. %C A306366 When s has no consecutive equal terms, then T(s) is all 1's (A000012). %C A306366 Apparently, T^4(K) = T^2(K) (where T^i denotes the i-th iterate of K). %H A306366 Rémy Sigrist, <a href="/A306366/a306366.gp.txt">PARI program for A306366</a> %F A306366 a(n) = A000002(ceiling(2*n/3)) (conjectured). - _Jon Maiga_, Jan 24 2021 %e A306366 The first terms of the Kolakoski sequence are: %e A306366 +-----+ +--+ +-----+ +-----+ +-- %e A306366 | | | | | | | | | %e A306366 +--+ +-----+ +--+ +--+ +-----+ %e A306366 |#1|#2 |#3 |#4|#5|#6 |#7|#8 |#9 |#10 ... %e A306366 +--+-----+-----+--+--+-----+--+-----+-----+-- %e A306366 1, 2, 2, 1, 1, 2, 1, 2, 2, 1, 2, 2, 1, 1, 2, ... %e A306366 . %e A306366 The first terms of this sequence are: %e A306366 +-----+--+ +-----+ +-----+-- %e A306366 | . | | | | . %e A306366 +--+ . +-----+--+ +--+ . %e A306366 |#1|#2 .#3|#4 .#5|#6 |#7|#8 .#9 ... %e A306366 +--+-----+--+-----+--+-----+--+-----+-- %e A306366 1, 2, 2, 2, 1, 1, 1, 2, 2, 1, 2, 2, 2, ... %o A306366 (PARI) See Links section. %Y A306366 Cf. A000002, A000012, A001650, A001670, A002024, A130196, A167817, A175944, A213083. %K A306366 nonn,easy %O A306366 1,2 %A A306366 _Rémy Sigrist_, Feb 10 2019