A071820 Kolakoski-(2,3) sequence: a(n) is length of n-th run.
2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 2, 2, 3, 3, 2
Offset: 1
Links
- Ivan Neretin, Table of n, a(n) for n = 1..10000
- Michael Baake and Bernd Sing, Kolakoski-(3,1) is a (deformed) model set, arXiv:math/0206098 [math.MG], 2002-2003.
- Johan Nilsson, A Space-Efficient Algorithm for Calculating the Digit Distribution in the Kolakoski Sequence, J. Int. Seq. 15 (2012) #12.6.7.
- Ulrich Reitebuch, Henriette-Sophie Lipschütz, and Konrad Polthier, Visualizing the Kolakoski Sequence, Bridges Conf. Proc.; Math., Art, Music, Architecture, Culture (2023) 481-484.
Programs
-
Mathematica
seed = {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, 43}]; w (* Ivan Neretin, Apr 01 2015 *)
Extensions
More terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Sep 08 2002