A036580 Ternary Thue-Morse sequence: closed under a->abc, b->ac, c->b.
0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2, 0, 2, 1, 0, 2, 0, 1, 2, 0, 2, 1, 0, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 2
Offset: 0
Keywords
References
- M. Lothaire, Combinatorics on Words. Addison-Wesley, Reading, MA, 1983, p. 26.
Links
- Paolo Xausa, Table of n, a(n) for n = 0..10000
- Marko Milosevic and Narad Rampersad, Squarefree words with interior disposable factors, arXiv:2007.03557 [math.CO], 2020.
- Michaël Rao, Michel Rigo, and Pavel Salimov, Avoiding 2-binomial squares and cubes, arXiv:1310.4743 [cs.FL], 2013.
- Michaël Rao, Michel Rigo, and Pavel Salimov, Avoiding 2-binomial squares and cubes, Theoretical Computer Science, Volume 572, 23 March 2015, Pages 83-91.
Programs
-
Mathematica
Nest[Flatten[# /. {0 -> {0, 1, 2}, 1 -> {0, 2}, 2 -> {1}}] &, {1}, 7] // Most (* Robert G. Wilson v, Jul 30 2018, corrected by Paolo Xausa, Jul 21 2025 *) 1 - Differences[ThueMorse[Range[0,100]]] (* Paolo Xausa, Jul 21 2025 *)
Comments