OFFSET
1,5
LINKS
Reinhard Zumkeller, Rows n = 1..25 of triangle, flattened
Eric Weisstein's World of Mathematics, Look and Say Sequence
Wikipedia, Look-and-say sequence
EXAMPLE
. Initial rows A007651
. 1: 1 1
. 2: 1,1 11
. 3: 1,2 12
. 4: 1,1,2,1 1121
. 5: 1,2,2,1,1,1 122111
. 6: 1,1,2,2,1,3 112213
. 7: 1,2,2,2,1,1,3,1 12221131
. 8: 1,1,2,3,1,2,3,1,1,1 1123123111
. 9: 1,2,2,1,3,1,1,1,2,1,3,1,1,3 12213111213113 .
PROG
(Haskell)
import Data.List (group)
a220424 n k = a220424_tabf !! (n-1) !! (k-1)
a220424_row n = a220424_tabf !! (n-1)
a220424_tabf = iterate
(concatMap (\xs -> [head xs, length xs]) . group) [1]
CROSSREFS
KEYWORD
nonn,base,tabf
AUTHOR
Reinhard Zumkeller, Dec 15 2012
STATUS
approved