[go: up one dir, main page]

login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A139337 Replace each digit with its number of occurrences in decimal representation of n. 8
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 22, 11, 11, 11, 11, 11, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,11
COMMENTS
A055642(a(n)) = A055642(n) for n < (10^10-1)/9; fixed points: a(A108571(n)) = A108571(n).
LINKS
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
Sequence in context: A169853 A064263 A138838 * A231115 A040110 A140452
KEYWORD
nonn,base,look
AUTHOR
Reinhard Zumkeller, Apr 14 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 11:14 EDT 2024. Contains 375543 sequences. (Running on oeis4.)