[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!)
Revision History for A139337 (Underlined text is an addition; strikethrough text is a deletion.)

Showing entries 1-10 | older changes
A139337 Replace each digit with its number of occurrences in decimal representation of n.
(history; published version)
#15 by Jon E. Schoenfield at Fri Mar 31 20:45:54 EDT 2017
STATUS

editing

approved

#14 by Jon E. Schoenfield at Fri Mar 31 20:45:51 EDT 2017
NAME

Replace each digit bywith its number of occurencesoccurrences in decimal representation of n.

STATUS

approved

editing

#13 by Reinhard Zumkeller at Fri Mar 14 14:06:16 EDT 2014
STATUS

editing

approved

#12 by Reinhard Zumkeller at Fri Mar 14 04:35:12 EDT 2014
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

STATUS

approved

editing

#11 by Reinhard Zumkeller at Mon Jan 27 17:19:27 EST 2014
STATUS

editing

approved

#10 by Reinhard Zumkeller at Mon Jan 27 16:56:12 EST 2014
KEYWORD

nonn,base,look

STATUS

approved

editing

#9 by Bruno Berselli at Thu Nov 28 09:14:01 EST 2013
STATUS

proposed

approved

#8 by Jean-François Alcover at Thu Nov 28 07:17:00 EST 2013
STATUS

editing

proposed

#7 by Jean-François Alcover at Thu Nov 28 07:16:53 EST 2013
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 *)

STATUS

approved

editing

#6 by Russ Cox at Fri Mar 30 18:51:00 EDT 2012
AUTHOR

_Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), _, Apr 14 2008

Discussion
Fri Mar 30 18:51
OEIS Server: https://oeis.org/edit/global/246

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 13:06 EDT 2024. Contains 375543 sequences. (Running on oeis4.)