Maths Olympiad Prep

Library / /22 of 61

Number theory Difficulty 6.2 National Olympiad Prove it Canada

Problem:
Find all functions ff defined on the natural numbers that take values among the natural numbers for which
(f(n))pn(modf(p)) (f(n))^{p} \equiv n \pmod{f(p)}
for all nNn \in \mathbf{N} and all prime numbers pp.

Solution

Solution:
The substitution n=pn = p, a prime, yields p(f(p))p0(modf(p))p \equiv (f(p))^{p} \equiv 0 \pmod{f(p)}, so that pp is divisible by f(p)f(p). Hence, for each prime pp, f(p)=1f(p) = 1 or f(p)=pf(p) = p.

Let S={p:p is prime and f(p)=p}S = \{p : p \text{ is prime and } f(p) = p\}. If SS is infinite, then f(n)pn(modp)f(n)^{p} \equiv n \pmod{p} for infinitely many primes pp. By the little Fermat theorem, nf(n)pf(n)n \equiv f(n)^{p} \equiv f(n), so that f(n)nf(n) - n is a multiple of pp for infinitely many primes pp. This can happen only if f(n)=nf(n) = n for all values of nn, and it can be verified that this is a solution.

If SS is empty, then f(p)=1f(p) = 1 for all primes pp, and any function satisfying this condition is a solution.

Now suppose that SS is finite and non-empty. Let qq be the largest prime in SS. Suppose, if possible, that q3q \geq 3. Therefore, for any prime pp exceeding qq, p1(modq)p \equiv 1 \pmod{q}. However, this is not true. Let QQ be the product of all the odd primes up to qq. Then Q+2Q + 2 must have a prime factor exceeding qq and at least one of them must be incongruent to 1(modq)1 \pmod{q}. (An alternative argument notes that Bertrand's postulate can turn up a prime pp between qq and 2q2q which fails to satisfy p1(modq)p \equiv 1 \pmod{q}.)

The only remaining case is that S={2}S = \{2\}. Then f(2)=2f(2) = 2 and f(p)=1f(p) = 1 for every odd prime pp. Since f(n)2n(mod2)f(n) 2 \equiv n \pmod{2}, f(n)f(n) and nn must have the same parity. Conversely, any function ff for which f(n)n(mod2)f(n) \equiv n \pmod{2} for all nn, f(2)=2f(2) = 2 and f(p)=1f(p) = 1 for all odd primes pp satisfies the condition.

Therefore the only solutions are
- f(n)=nf(n) = n for all nNn \in \mathbf{N};
- any function ff with f(p)=1f(p) = 1 for all primes pp;
- any function for which f(2)=2f(2) = 2, f(p)=1f(p) = 1 for primes pp exceeding 22 and f(n)f(n) and nn have the same parity.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.