A026608 a(n) = number of 2's between n-th 1 and (n+1)st 1 in A026600.
2, 0, 2, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 2, 0, 1, 2, 0, 1, 1, 1, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 1, 1, 1, 2, 0, 1, 2, 0, 2, 0, 2, 0, 1, 1, 2, 0, 2, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 0, 2, 0, 2, 0, 1, 1, 1, 2, 0, 2, 0, 1
Offset: 1
Keywords
Examples
beta(B) = mu(123) = 123231312 = EDC.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..19683
- Jacques Justin and Laurent Vuillon, Return words in Sturmian and episturmian words, RAIRO-Theoretical Informatics and Applications 34.5 (2000): 343-356.
Programs
-
Mathematica
Map[Count[#, 2] &, DeleteCases[SplitBy[#, # == 1 &], ?(# == {1} &)]] &@ Nest[Flatten[# /. {1 -> {1, 2, 3}, 2 -> {2, 3, 1}, 3 -> {3, 1, 2}}] &, {1}, 6] (* _Michael De Vlieger, Apr 16 2019, after Robert G. Wilson v at A026600 *)
Comments