|
%I
%S 11,21,1121,3121,132121,1113122121,311311222121,13211321322121,
%T 1113122113121113222121,31131122211311123113322121,
%U 132113213221133112132123222121
%N Describe the previous term! (method A - initial term is 11).
%C 11 as being interesting because it gives 2 ones:
%C 21 as the second term.
%C Used is the code by Zerinvary Lajos (zerinvarylajos(AT)yahoo.com)
%D Marcus Du Sautoy, Symmetry: A Journey into the Patterns of Nature,Harper (March 11, 2008),page 96
%t Clear[F, n];
%t RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split[ x ];
%t LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, { d}, n - 1 ];
%t F[ n_ ] := LookAndSay[ n, 11 ][ [ n ] ];
%t Table[ FromDigits[ F[ n ] ], {n, 1, 20} ]
%Y A006715, A006751, A001141
%K nonn,uned
%O 1,1
%A _Roger L. Bagula_, Mar 12 2009
|