|
|
A022514
|
|
Describe previous term from the right (method B - initial term is 3).
|
|
9
|
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Method B = 'digit'-indication followed by 'frequency'.
|
|
LINKS
|
|
|
EXAMPLE
|
The term after 1131 is obtained by saying "1 once, 3 once, 1 twice", which gives 113112.
|
|
MATHEMATICA
|
|
|
PROG
|
(Haskell)
import Data.List (group, transpose)
a022514 n = a022514_list !! n
a022514_list = 3 : f [3] :: [Integer] where
f xs = (read $ concatMap show ys) : f ys where
ys = concat $ transpose [map head zss, map length zss]
zss = reverse $ group xs
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|