1

We know primality is in P which gives an answer for all prime numbers that the number of prime factors of a prime number is 1.

Is there an algorithm in P that would give answers for composite numbers about the number of their prime factors?

Meaning:

  • 21 => 2
  • 63 => 2 or 3 if We count factor multiple times
  • 2
    Determining the number of prime factors is probably not in $P$ , it is asymptotically as difficult as factoring an integer. $42$ has no prime factor with multiplicity more than $1$. Did you have another example in mind ? – Peter Oct 26 '21 at 10:04
  • 1
    Yeah, sorry, wrong example. Should have been 63, fixed. – Alexander Weps Oct 26 '21 at 10:09
  • But I consider it really interesting that this problem should be of a different scope than primality testing. – Alexander Weps Oct 26 '21 at 10:15
  • 1
    Primality testing is much easier than factoring. Most methods are based on Fermat's little theorem that screens most composite numbers immediately composite. Of course this needs some refinements until the test has a very high accuracy or is even deterministic. Those methods however do not find a nontrivial factor (if this were the case, factorization would of course be in $P$). – Peter Oct 26 '21 at 10:19
  • But this is not really factoring, isn't it? Because you can't get actual factors from the number of prime factors. The question really is if numbers consisting of a single prime factor behaves differently than numbers consisting of multiple prime factors, do the numbers consisting of two prime factors behave differently than numbers consisting of more than two prime factors, etc.? – Alexander Weps Oct 26 '21 at 10:40
  • The best known methods for prime factorizations are the elliptic curve method (to find factors upto about $40$ digits independent of the size of the number) and the quardratic sieve (the running time grows exponential with the number of digits, but all factors are found). Very small factors are found by trial division. – Peter Oct 26 '21 at 11:07
  • So, no , primality testing is not factoring , unless we have a prime already. – Peter Oct 26 '21 at 11:08
  • See also https://math.stackexchange.com/questions/433792/check-if-a-number-is-semiprime/637571 – lhf Oct 26 '21 at 11:55
  • https://en.wikipedia.org/wiki/Prime_omega_function and related but I think not duplicate question: https://math.stackexchange.com/questions/409675/number-of-distinct-prime-factors-omegan – DanielV Oct 26 '21 at 16:19

0 Answers0