Problem 60351. List the smallest numbers with n distinct prime factors
The author of a book I am reading asked a mathematician what it feels like to be sixty. He wrote
He replied, “Sixty, sandwiched between two primes, has the property that no smaller number has more distinct prime factors. Other than that, nothing special.”
But something is wrong here, right? The prime factors of 60 are 2, 2, 3, and 5, so the distinct prime factors are 2, 3, and 5. Therefore, 30 is the smallest number with three distinct prime factors.*
Write a function to compute the smallest number with n distinct prime factors. The output should be a character string.
*It’s also sandwiched between two primes, but that does not matter for this problem.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers6
Suggested Problems
-
3336 Solvers
-
It dseon't mettar waht oedrr the lrettes in a wrod are.
1891 Solvers
-
Vectorize the digits of an Integer
324 Solvers
-
How many days does the cat take to climb out of the hole?
78 Solvers
-
Count number of words in string
179 Solvers
More from this Author291
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!