2

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:

  1. Getting the set S of prime factors e of n.
  2. Arrange set S in descending order.
  3. Subtract 1 from every element e of set S.
  4. Put a prime number p as base, such that:
    px-1< px, and treat ex as exponent, for each element of set S.
  5. 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.

0 Answers0