A080717 Let S(0) = 1; obtain S(k) from S(k-1) by applying 1 -> 2, 2 -> 31, 3 -> 332; sequence is S(0), S(1), S(2), ...
2, 3, 1, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 1, 3, 1, 3, 3, 2, 3, 3, 2, 3, 1, 3, 3, 2, 3, 3, 2, 3, 1, 3, 3, 2, 2, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 1, 3, 3, 2, 3, 3, 2, 3, 1, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 1, 3, 3, 2, 3, 3, 2, 3, 1, 3, 3, 2, 2, 3, 3, 2, 3, 3, 2, 3, 1, 3, 1, 3, 3, 2, 3, 3, 2, 3, 1, 3, 1, 3, 3, 2, 3
Offset: 1
Examples
2 31 3322 3323323131 ...
Programs
-
Mathematica
Flatten[ Table[ Nest[ Flatten[ # /. {1 -> {2}, 2 -> {3, 1}, 3 -> {3, 3, 2}}] &, {2}, n], {n, 0, 6}]] (* Robert G. Wilson v, May 07 2005 *)
Extensions
Edited by Robert G. Wilson v, May 07 2005
Comments