Input
A single integer \$1 \leq x \leq 10^{15}\$.
Output
The maximum number of distinct positive integers that have the product \$x\$.
Examples
Input: 1099511627776. Output: 9. One possible optimal list of factors is: (1, 2, 4, 8, 16, 32, 64, 128, 4096).
Input: 127381. Output 4. One possible optimal list of factors is: (1, 17, 59, 127).
Related to this old question.
code-golf
. You may consider eitherfastest-code
orfastest-algorithm
for an upcoming challenge. If you really wanted all answers to work in a limited time within the specified range, it should have been explicitly mentioned. (And I would have recommended a smaller range so that it does not conflict withcode-golf
entirely.) \$\endgroup\$x=1, 2, ...
I getf(x)=1, 2, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 2, 3, 2, 3, 3, 3, 2, 4, 2, 3, 3, 3, 2, 4, 2, 3, 3, 3, 3, 4, 2, 3
which I do not find in OEIS. It is clear enough that records will appear for factorial numbersx
. For example the smallestx
such thatf(x)=13
will be13!
. I guessf
depends only on the exponents of the prime factorization. So to findf(13^4*19^7*29^2)
we might simplify tof(2^7*3^4*5^2)
. \$\endgroup\$