A043536 Number of distinct base-9 digits of n.
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 1, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 3, 3
Offset: 1
Examples
As 731 = 1*(9^3) + 0*(9^2) + 0*(9^1) + 2*(9^0), it is written in base 9 (A007095) as "1002". There are three kinds of digits present, thus a(731) = 3. - _Antti Karttunen_, Dec 22 2017
Links
- Antti Karttunen, Table of n, a(n) for n = 1..66430
Programs
-
Mathematica
Table[Count[DigitCount[n,9],+?(#>0&)],{n,100}] (* _Harvey P. Dale, Apr 30 2015 *)
-
PARI
A043536(n) = length(vecsort(digits(n,9),,8)); \\ Antti Karttunen, Dec 22 2017
Extensions
More terms from Antti Karttunen, Dec 22 2017