Find all functions such that, for all positive integers , , and , the following holds:
1.
2.
IMO Team Selection Test 2
Solution
We first show that for all .
We start by substituting . This yields . Then on the one hand is injective, since if then it immediately follows that . On the other hand, is surjective, since for every there is an such that , namely . Hence is bijective. Now we substitute , which yields . Because of the injectivity of , it follows
Now choose for which . (It follows from our proof of the surjectivity of that we can choose for this, but that is not important.) If we substitute in the above we obtain . In particular, is a divisor of , and since it must be a natural number we conclude that .
Substituting , now yields .
Now we can substitute and for and respectively, so that we obtain the more classical equation
It follows that is determined by the values with prime.
Let be a prime number, and let and be natural numbers such that . Then it follows that . Since and are natural numbers, it must hold that or . Because of injectivity, the only for which is the number . So either or . We conclude that is a prime number.
Now suppose that holds. In particular, we have , so has a multiplicative inverse modulo . Let be a natural number in the residue class of this inverse, i.e. . Since , it follows from the second equation that , but also that . However, it follows from the previous paragraph that and . Therefore is a divisor of both and . Now we calculate
since is the multiplicative inverse of modulo . Because of injectivity, we know that , so implies that .
Suppose for a prime divisor of that , with a different prime number. Then it follows that . So all prime numbers not mapped to themselves by form pairs with and . Since , we have four possible cases:
* for all primes . So is the identity,
* , and for all ,
* , and for all ,
* , and for all .
It is easy to check that all four of these cases actually lead to a function that satisfies the given conditions.