OFFSET
0,2
COMMENTS
Let S(0) = 1; obtain S(k) from S(k-1) by applying 1 -> 221, 2 -> 2221; sequence is S(0), S(1), S(2), ... - Matthew Vandermast, Mar 25 2003
The sequence (a(n+1)-1) is the homogeneous Sturmian sequence with slope sqrt(3)-1, which is fixed point of the morphism 0->110, 1->1101. So (a(n), n>0) is the unique fixed point of the morphism 1->221, 2->2212. - Michel Dekking, Oct 06 2018
The dual version defined by b(n)=1-(a(n)-1) for n>0 is the Sturmian sequence with slope 1-(sqrt(3)-1) = 2-sqrt(3). It is the fixed point of the morphism 0->0010, 1->001. The sequence (b(n)) prefixed with 0 equals A275855. - Michel Dekking, Oct 06 2018
LINKS
Michel Dekking, Substitution invariant Sturmian words and binary trees, Integers 18A, #A7, 1-15 (2018).
FORMULA
a(n) = A007538(n+1) - 1. - Reinhard Zumkeller, Feb 13 2012
MATHEMATICA
Flatten[ NestList[ Flatten[ # /. {1 -> {2, 2, 1}, 2 -> {2, 2, 2, 1}}] &, {1}, 4]] (* Robert G. Wilson v, Jun 20 2005 *)
Differences[Floor[Range[0, 110]Sqrt[3]]] (* Harvey P. Dale, Mar 15 2018 *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 25 2003
STATUS
approved