How would I determine all values of n in ϕ(n) = x for any value of x where ϕ is Euler's totient function? (and -1 if x is not a totient). Is there a simple formula for this? Or is this a lot more complicated than I think this is? Simply trying every number from x + 1 to the upper limit is too inefficient. I will be using numbers up to 1,000,000,000,000, so efficiency is key here.
Asked
Active
Viewed 226 times
2
-
1Seems like the latter ... see e. g. here – martini Oct 19 '15 at 14:44
-
1You may find some idea how to do this for some given $x$ from various older posts on this site. For example: http://math.stackexchange.com/questions/1126844/eulers-function-phi-values-such-that-phin-8-phin-14 and http://math.stackexchange.com/questions/761014/solving-phin-84 (And a few more posts are linked in the sidebar among related questions.) – Martin Sleziak Oct 19 '15 at 15:06