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)$?