The function takes in a positive integer , and gives the number of distinct digits in , when written in base 10.
How many elements are there in the range of ?
As an explicit example, , since there are three distinct digits in 1123, namely 1, 2, and 3.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
dd ( n ) = number of distinct digits in n at base 1 0
At base 1 0 , we have 1 0 different types of digits: 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9
Each number must have at least 1 distinct digit, and it will have at most 1 0 distinct digits. A number can have 2 to 9 distinct digits too.
Therefore, the range of dd ( n ) , R dd = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 1 0 }
The number of elements in the range, n ( R dd ) = 1 0