Problem 58249. Easy Sequences 114: Counting Unique Numbers
A Unique Number is defined as a positive integer with no repeated digits. This means that and are unique numbers, but and are not.
Given the number B, write a program the calculates the number of unique numbers in base-B.
For example:
⋅ In base-2, there are only 2 unique numbers: .
⋅ In base-3, there are 10 unique numbers: .
⋅ In base-4, there are 48 unique numbers:
⋅ And in base-10, there are 8,877,690 unique numbers.
The output could be greater than flintmax, therefore please present your output as character strings.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers2
Suggested Problems
-
Maximum running product for a string of numbers
2103 Solvers
-
Project Euler: Problem 10, Sum of Primes
1645 Solvers
-
Return elements unique to either input
757 Solvers
-
Duplicate each element of a vector.
596 Solvers
-
Generate a string like abbcccddddeeeee
258 Solvers
More from this Author116
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!