OFFSET
0,2
COMMENTS
Method A = 'frequency' followed by 'digit'-indication.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..21
Eric Weisstein's World of Mathematics, Look and Say Sequence
Wikipedia, Look-and-say sequence
FORMULA
EXAMPLE
The term after 1011 is obtained by saying "two 1's, one 0, one 1", which gives 211011.
MATHEMATICA
a[0] = 0;
a[n_] := a[n] = Split[IntegerDigits[a[n-1]]] /. L_List /; IntegerQ[L[[1]]] :> {Length[L], L[[1]]} // Reverse // Flatten // FromDigits;
a /@ Range[0, 9] (* Jean-François Alcover, Nov 26 2019 *)
PROG
(Haskell)
a022506 n = a022506_list !! n
a022506_list = 0 : 10 : iterate (a045918 . a004086) 1011
-- Reinhard Zumkeller, Mar 02 2014
CROSSREFS
KEYWORD
nonn,base,easy,nice
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved