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 A079729 #38 Aug 06 2025 11:55:12 %S A079729 1,2,2,3,3,1,1,1,2,2,2,3,1,2,3,3,1,1,2,2,3,3,3,1,2,2,3,3,3,1,1,1,2,3, %T A079729 1,1,2,2,3,3,3,1,1,1,2,2,2,3,1,1,2,2,3,3,3,1,1,1,2,2,2,3,1,2,3,3,1,1, %U A079729 1,2,3,1,1,2,2,3,3,3,1,1,1,2,2,2,3,1,2,3,3,1,1,2,2,3,3,3,1,2,3,3,1,1,2,2,2 %N A079729 Kolakoski-(1,2,3) sequence: a(n) is the length of the n-th run. %C A079729 Old name was: Kolakoski variation using (1,2,3) starting with 1,2. %C A079729 Partial sum sequence is expected to be asymptotic to 2*n. %C A079729 From _Michel Dekking_, Jan 31 2018: (Start) %C A079729 (a(n)) is the unique fixed point of the 3-block substitution beta given by %C A079729 111 -> 123, 112 -> 1233, %C A079729 122 -> 12233, 123 -> 122333, %C A079729 222 -> 112233, 223 -> 1122333, %C A079729 231 -> 112223, 233 -> 11222333, %C A079729 311 -> 11123, 312 -> 111233, %C A079729 331 -> 1112223, 333 -> 111222333. %C A079729 Here BL3 := {111, 112, 122, 123, 222, 223, 231, 233, 311, 312, 331, 333} is the set of all words of length 3 occurring at a position 1 mod 3 in (a(n)). This can be seen by splitting the words beta(B) into words of length 3, and looking at the possible extensions of those words beta(B) that have a length which is not a multiple of 3. For example, beta(122) = 12233 can only be extended to 122331 or to 122333, and both words 331 and 333 are in BL3. Interestingly, BL3 is invariant for the permutation 1->3, 2->1, 3->2 (and its square). %C A079729 Note: In general, a 3-block substitution beta maps a word w(1)...w(3n) to the word %C A079729 beta(w(1)w(2)w(3))...beta(w(3n-2)w(3n-1)w(3n)). %C A079729 If the length of a word w is 3n+r, with r=1 or r=2, then the last letter, respectively last 2 letters are ignored. (End) %C A079729 Conjecture: the frequencies of 1's, 2's and 3's in (a(n)) exist and are all equal to 1/3. This conjecture implies the conjecture of Benoit Cloitre on the partial sum sequence. - _Michel Dekking_, Jan 31 2018 %H A079729 Ivan Neretin, <a href="/A079729/b079729.txt">Table of n, a(n) for n = 1..10000</a> %H A079729 Kerry Mitchell, <a href="http://www.archive.bridgesmathart.org/2025/bridges2025-239.html">Creating Unicursal Curves Using Tiles</a>, Bridges Conf. Proc. (2025) 239-246. %H A079729 Ulrich Reitebuch, Henriette-Sophie Lipschütz, and Konrad Polthier, <a href="https://archive.bridgesmathart.org/2023/bridges2023-481.html">Visualizing the Kolakoski Sequence</a>, Bridges Conf. Proc.; Math., Art, Music, Architecture, Culture (2023) 481-484. %F A079729 Iterate beta: 122 -> 12233 ~ 122331 -> 122331112223 -> 12233111222312331122333, etc. Here a(6)=1 has been added to 12233 in step two to continue the iteration. - _Michel Dekking_, Jan 31 2018 %e A079729 Sequence begins: 1,2,2,3,3,1,1,1,2,2,2,3,1,2,3,3,1,1,... read it as: (1),(2,2),(3,3),(1,1,1),(2,2,2),(3),(1),(2),(3,3),(1,1),... then count the terms in parentheses to get: 1,2,2,3,3,1,1,1,2,2,... which is the same sequence. %t A079729 seed = {1, 2, 3}; w = {}; i = 1; Do[w = Join[w, Array[seed[[Mod[i - 1, Length[seed]] + 1]] &, If[i > Length[w], seed, w][[i]]]]; i++, {n, 53}]; w (* _Ivan Neretin_, Apr 02 2015 *) %o A079729 (PARI) a=[1,2,2];for(n=3,100,for(i=1,a[n],a=concat(a,1+((n-1)%3))));a; \\ _Benoit Cloitre_, Feb 13 2009 %Y A079729 Cf. A000002. %K A079729 nonn %O A079729 1,2 %A A079729 _Benoit Cloitre_, Feb 17 2003 %E A079729 More terms from _Philippe Deléham_, Sep 24 2006 %E A079729 Name changed and text edited by _Michel Dekking_, Jan 31 2018