I'm trying to show that the language {(m,n)|m has exactly n divisors} is in NP.
The input (m,n) is in binary.
The non-deterministic Turing machine for the language would be:
1) Guess the prime factors of m.
2) Verify that ∏i(di+1)=n.
The problem is that I can't find a way to factorize in polynomial time (in the input) the number m.
If stage 1 takes m steps then it would be m=2 ^ log(m) and the whole algorithm would run in exponential time.
How can I prove that verifying that m has exactly n divisors is in NP ? Perhaps not via factorization but somehow else. I've run out of ideas.