I came upon this question when I was trying to look for a general computer approach (better than a brute force approach) to solve the equation, $\\ \phi(n) = k$ for any given $k$. It could be made a lot faster if there was an easy and efficient way to determine the number of distinct prime factors a number has. Does anyone know if there is a function in number theory that does this, and if there is, what is the most efficient way to calculate it?
Asked
Active
Viewed 1,012 times
0
-
There is a polynomial time primality testing algorithm. Perhaps there is a polynomial time algorithm for your generalization of primality testing. – André Nicolas Jul 01 '16 at 18:31
2 Answers
1
There are many algorithms on integer factorization, but they do not run in polynomial time (only sub-exponential time). So it is possible to determine the number of prime divisors of integers $n$ for a "reasonable size" on $n$. On the other hand, there is a lot known about solving the equation $\phi(n)=k$, where we do not need to know the number of prime divisors of $n$, e.g., see this question and the references given.
Dietrich Burde
- 130,978
0
No, there is no known such computable function as the numbers get sufficiently large. For example, it's unknown how many prime factors googolplex+1 has, but it's over 14.
Ed Pegg
- 20,955
-
1It is a computable function: there exists an exponential-time algorithm, e.g., factorize the number with trial division, then count the number of distinct factors. I suspect this answer is confusing "computable" with "efficiently computable" (e.g., in polynomial time), and even then, we don't have a proof that it can't be done in polynomial time, though there are certainly strong suspicions that it can't be done in polynoimal time. – D.W. Nov 06 '23 at 05:10