A156595 Fixed point of the morphism 0->011, 1->010.
0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0
Offset: 0
Examples
0 -> 0,1,1 -> 0,1,1,0,1,0,0,1,0 -> ...
References
- M. Lothaire, Combinatorics on words.
Links
- J.-P. Allouche and R. Bacher, Toeplitz Sequences, Paperfolding, Towers of Hanoi, and Progression-Free Sequences of Integers, L'Enseignement Mathématique, volume 38, pages 315-327, 1992.
- Joerg Arndt, Matters Computational (The Fxtbook) (section 1.31.5 "Dragon curves based on radix-R counting", pp. 95-101, image on p. 101).
- Gabriele Fici and Jeffrey Shallit, Properties of a Class of Toeplitz Words, arXiv:2112.12125 [cs.FL], 2021.
- Kevin Ryde, Iterations of the Terdragon Curve, see index "AltTurnRpred" with AltTurnRpred(n) = a(n-1).
- Index entries for sequences that are fixed points of mappings
Crossrefs
Programs
-
Mathematica
Nest[ Flatten[ # /. {0 -> {0, 1, 1}, 1 -> {0, 1, 0}}] &, {0}, 10] SubstitutionSystem[{0->{0,1,1},1->{0,1,0}},0,{5}][[1]] (* Harvey P. Dale, Jan 15 2022 *)
-
Python
from sympy import integer_log def A156595(n): return sum(((m:=(n+1)//9**i)-2)//9+(m-3)//9+(m-5)//9+(m-8)//9+4 for i in range(integer_log(n+1,9)[0]+1))-sum(((m:=n//9**i)-2)//9+(m-3)//9+(m-5)//9+(m-8)//9+4 for i in range(integer_log(n,9)[0]+1)) if n else 0 # Chai Wah Wu, Feb 16 2025
Formula
a(3k-2)=0, a(3k-1)=1, a(3k)=1-a(k) for k>=1, a(0)=0. - Clark Kimberling, Apr 28 2011
Comments