login
A101662
Fixed point of morphism 0 -> 01, 1 -> 02, 2 -> 21.
0
0, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 2, 1, 0, 2, 0, 1, 0, 2, 0, 1, 2, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 2, 1, 0, 2, 2, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 2, 1, 0, 2, 0, 1, 0, 2, 0, 1, 2, 1, 0, 1, 0, 2, 2, 1, 0, 2, 0, 1, 0, 2, 0, 1, 2, 1, 2, 1, 0, 2, 0, 1, 2, 1, 2, 1, 0, 2, 0, 1, 2, 1, 0
OFFSET
0,4
FORMULA
a(2n) = 2[a(n)==2], a(2n+1) = 1 + [a(n)==1].
MATHEMATICA
Nest[ Function[ l, {Flatten[(l /. {0 -> {0, 1}, 1 -> {0, 2}, 2 -> {2, 1}})]}], {0}, 7] (* Robert G. Wilson v, Feb 28 2005 *)
CROSSREFS
Sequence in context: A178108 A021501 A237049 * A091064 A373005 A275760
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Dec 11 2004
STATUS
approved