login
Say what you see in previous term, reporting each digit encountered followed by frequency.
1

%I #3 Oct 31 2013 12:17:40

%S 1,11,12,1121,1321,122131,132231,122232,112431,13213141,14213241,

%T 13223142,12233241,12233241,12233241,12233241,12233241,12233241,

%U 12233241,12233241,12233241,12233241

%N Say what you see in previous term, reporting each digit encountered followed by frequency.

%F Constant at 12233241 after 13 terms.

%e To get the term after 13213141, we say: four 1's, one 2, two 3's, one 4; therefore 14213241 (digit named before frequency).

%t RunLengthEncode[ x_List ] := (Through[ {First, Length}[ #1 ] ] &) /@ Split@ Sort@x; LookAndSay[ n_, d_:1 ] := NestList[ Flatten[ Reverse /@ RunLengthEncode[ # ] ] &, {d}, n - 1 ]; F[ n_ ] := LookAndSay[ n, 1 ][ [ n ] ]; Table[ FromDigits[ F[ n ] ], {n, 1, 15} ] (* _Robert G. Wilson v_ Sep 11 2006 *)

%Y Another variant of A005150, A005151, A063850, etc.

%K base,easy,nonn

%O 1,2

%A Ross Presser (rpresser(AT)gmail.com), Sep 09 2006