A043537 Number of distinct base-10 digits of n.
1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2
Offset: 1
Links
- R. Zumkeller, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Haskell
import Data.List (nub) a043537 = length . nub . show -- Reinhard Zumkeller, Apr 16 2011
-
Maple
A043537 := proc(n) convert(convert(n,base,10),set) ; nops(%) ; end proc: # R. J. Mathar, Dec 22 2012
-
Mathematica
Count[DigitCount@ #, n_ /; n > 0] & /@ Range@ 120 (* Michael De Vlieger, Aug 29 2015 *)
-
PARI
a(n)=#vecsort(digits(n),,8) \\ Charles R Greathouse IV, Oct 02 2013
-
Python
def A043537(n): return len(set(str(n))) # Dimiter Skordev, Oct 02 2021
Comments