OFFSET
0,11
LINKS
R. Zumkeller, Table of n, a(n) for n = 0..25000
EXAMPLE
a(373) = 212, since, reading the digits of 373 from left to right, 3 appeared twice, 7 once, 3 twice.
MATHEMATICA
a[n_] := IntegerDigits[n] /. Thread[{1, 2, 3, 4, 5, 6, 7, 8, 9, 0} -> DigitCount[n]] // FromDigits; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Nov 28 2013 *)
PROG
(Haskell)
import Data.List (group, sort); import Data.Maybe (mapMaybe)
a139337 n = read $ concatMap show $ mapMaybe (flip lookup ls) ds :: Int
where ls = zip (map head zss) (map length zss)
zss = group $ sort ds
ds = map (read . return) $ show n :: [Int]
-- Reinhard Zumkeller, Mar 14 2014
CROSSREFS
KEYWORD
AUTHOR
Reinhard Zumkeller, Apr 14 2008
STATUS
approved