Let $\varphi(n)$ denote Euler's totient function. Find all integers such that $\varphi(n)=16$.
Answers given were $17,32,34,40,48.$
I am thinking a generalisation of this problem: is there a way to find all positive integers $n$ such that $\varphi(n)=k$ for a specific $k$? Is there a way to do it other than trial and error? (which is what I did BTW)
Here is a very good page on this problem.
It has a calculator that finds all solutions to inverting the Euler totient $\phi$. I put in $16$ and it found that there are exactly six solutions: $$34, 60, 40, 48, 32, 17.$$
It also gives links describing the algorithm used to them (which involves traversing some tree) and the complexity of the problem.