%I #8 Mar 16 2015 22:29:22
%S 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,
%T 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,
%U 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
%N 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), ...
%C a(n) = A080704(n+1) - A080704(n). Sum of first n terms + 2 = A080704(n+1).
%e 2 31 3322 3323323131 ...
%t 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 *)
%K easy,nonn
%O 1,1
%A _Matthew Vandermast_, Mar 06 2003
%E Edited by _Robert G. Wilson v_, May 07 2005