Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A118628
"Say what you see".
3
3, 13, 1113, 3113, 2123, 112213, 312213, 212223, 114213, 31121314, 41122314, 31221324, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314, 21322314
OFFSET
1,1
FORMULA
a(n) = 21322314 for n > 12; a(n) = A005151(n) for n > 6. - Reinhard Zumkeller, Jan 26 2014
a(n) = A047842(a(n-1)). - Pontus von Brömssen, Jun 04 2023
EXAMPLE
3 = "one three" --> 13
13 = "one one, one three" --> 1113
1113 = "three ones, one three" --> 3113
3113 = "two ones, two threes" --> 2123
PROG
(Haskell)
import Data.List (group, sort, transpose)
a118628 n = a118628_list !! (n-1)
a118628_list = 3 : f [3] :: [Integer] where
f xs = (read $ concatMap show ys) : f (ys) where
ys = concat $ transpose [map length zss, map head zss]
zss = group $ sort xs
-- Reinhard Zumkeller, Jan 26 2014
CROSSREFS
Cf. A005151.
Sequence in context: A092540 A073176 A073428 * A112513 A006715 A177362
KEYWORD
nonn
AUTHOR
Parthasarathy Nambi, May 09 2006
STATUS
approved