1

Given a positive integer $k$, I'd like to be able to compute the set of positive integers $m$ such that $m$ is prime to precisely $k$ positive integers less than $m$. In other words, I'd like to compute the set $\phi^{-1}(k)$, where $\phi$ is Euler's totient function.

We could compute this by brute force using one of the lower bounds for $\phi$ to find an $N$ so that $n \geq N$ implies $\phi(n) > k$ and then we could test all $m < N$ to see if $\phi(m)=k$, but is there are smarter way to compute $\phi^{-1}(k)$?

user91500
  • 5,606
  • Have you considered this post? – abiessu Sep 26 '13 at 14:05
  • Thanks. I missed that question, where Pete Clark says he doesn't see a smarter way of doing it than using a lower bound. So I think that my question still stands. –  Sep 26 '13 at 14:15
  • OK. It's more or less a duplicate. The answer seems to be, you can do it, but not without sweat. How do I close the question? –  Sep 26 '13 at 14:52

0 Answers0