The brute force approach would be checking every possible number.
If it has n factors: x++.
until: x = i.
but I just learned that you could get i = 1 that has n factors by:
- Getting the set S of prime factors e of n.
- Arrange set S in descending order.
- Subtract 1 from every element e of set S.
- Put a prime number p as base, such that:
px-1< px, and treat ex as exponent, for each element of set S. - Multiply every element.
Now given i = 1, What is the possible approach to get the ith term?
If you could provide an answer that would work on prime numbers that would be great.