login
Trajectory of 0 under the morphism 0 -> 01, 1 -> 202, 2 -> empty string.
1

%I #11 Oct 02 2016 10:24:23

%S 0,1,2,0,2,0,1,0,1,2,0,2,0,1,2,0,2,0,1,0,1,2,0,2,0,1,0,1,2,0,2,0,1,2,

%T 0,2,0,1,0,1,2,0,2,0,1,2,0,2,0,1,0,1,2,0,2,0,1,0,1,2,0,2,0,1,2,0,2,0,

%U 1,0,1,2,0,2,0,1,0,1,2,0,2,0,1,2,0,2,0

%N Trajectory of 0 under the morphism 0 -> 01, 1 -> 202, 2 -> empty string.

%D J.-P. Allouche and J. Shallit, Automatic Sequences, Cambridge Univ. Press, 2003, p. 228.

%H Chai Wah Wu, <a href="/A214332/b214332.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Fi#FIXEDPOINTS">Index entries for sequences that are fixed points of mappings</a>

%o (Python)

%o from itertools import chain

%o A214332 = [0]

%o for _ in range(10):

%o ....A214332 = list(chain.from_iterable(([0,1] if d == 0 else [2,0,2] if d == 1 else [] for d in A214332)))

%o # _Chai Wah Wu_, Sep 05 2014

%K nonn

%O 0,3

%A _N. J. A. Sloane_, Jul 26 2012