Olympiad Maths Prep

Track / Stage 10 / 10 of 40 #1970 of 2000

Problem 1970

Hardest shortlist tier
Number theory Difficulty 9.2 Prove it 49th International Mathematical Olympiad Spain · IMO

For every nNn \in \mathbb{N} let d(n)d(n) denote the number of (positive) divisors of nn. Find all functions f:NNf: \mathbb{N} \rightarrow \mathbb{N} with the following properties:
(i) d(f(x))=xd(f(x))=x for all xNx \in \mathbb{N};
(ii) f(xy)f(x y) divides (x1)yxy1f(x)(x-1) y^{x y-1} f(x) for all x,yNx, y \in \mathbb{N}.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

There is a unique solution: the function f:NNf: \mathbb{N} \rightarrow \mathbb{N} defined by f(1)=1f(1)=1 and
f(n)=p1p1a11p2p2a21pkpkak1 where n=p1a1p2a2pkak is the prime factorization of n>1. f(n)=p_{1}^{p_{1}^{a_{1}}-1} p_{2}^{p_{2}^{a_{2}}-1} \cdots p_{k}^{p_{k}^{a_{k}}-1} \text{ where } n=p_{1}^{a_{1}} p_{2}^{a_{2}} \cdots p_{k}^{a_{k}} \text{ is the prime factorization of } n>1.
Direct verification shows that this function meets the requirements.

Conversely, let f:NNf: \mathbb{N} \rightarrow \mathbb{N} satisfy (i) and (ii). Applying (i) for x=1x=1 gives d(f(1))=1d(f(1))=1, so f(1)=1f(1)=1. In the sequel we prove that (1) holds for all n>1n>1. Notice that f(m)=f(n)f(m)=f(n) implies m=nm=n in view of (i). The formula d(p1b1pkbk)=(b1+1)(bk+1)d\left(p_{1}^{b_{1}} \cdots p_{k}^{b_{k}}\right)=\left(b_{1}+1\right) \cdots\left(b_{k}+1\right) will be used throughout.

Let pp be a prime. Since d(f(p))=pd(f(p))=p, the formula just mentioned yields f(p)=qp1f(p)=q^{p-1} for some prime qq; in particular f(2)=q21=qf(2)=q^{2-1}=q is a prime. We prove that f(p)=pp1f(p)=p^{p-1} for all primes pp.

Suppose that pp is odd and f(p)=qp1f(p)=q^{p-1} for a prime qq. Applying (ii) first with x=2x=2, y=py=p and then with x=p,y=2x=p, y=2 shows that f(2p)f(2 p) divides both (21)p2p1f(2)=p2p1f(2)(2-1) p^{2 p-1} f(2)=p^{2 p-1} f(2) and (p1)22p1f(p)=(p1)22p1qp1(p-1) 2^{2 p-1} f(p)=(p-1) 2^{2 p-1} q^{p-1}. If qpq \neq p then the odd prime pp does not divide (p1)22p1qp1(p-1) 2^{2 p-1} q^{p-1}, hence the greatest common divisor of p2p1f(2)p^{2 p-1} f(2) and (p1)22p1qp1(p-1) 2^{2 p-1} q^{p-1} is a divisor of f(2)f(2). Thus f(2p)f(2 p) divides f(2)f(2) which is a prime. As f(2p)>1f(2 p)>1, we obtain f(2p)=f(2)f(2 p)=f(2) which is impossible. So q=pq=p, i.e. f(p)=pp1f(p)=p^{p-1}.

For p=2p=2 the same argument with x=2,y=3x=2, y=3 and x=3,y=2x=3, y=2 shows that f(6)f(6) divides both 35f(2)3^{5} f(2) and 26f(3)=26322^{6} f(3)=2^{6} 3^{2}. If the prime f(2)f(2) is odd then f(6)f(6) divides 32=93^{2}=9, so f(6){1,3,9}f(6) \in\{1,3,9\}. However then 6=d(f(6)){d(1),d(3),d(9)}={1,2,3}6=d(f(6)) \in\{d(1), d(3), d(9)\}=\{1,2,3\} which is false. In conclusion f(2)=2f(2)=2.

Next, for each n>1n>1 the prime divisors of f(n)f(n) are among the ones of nn. Indeed, let pp be the least prime divisor of nn. Apply (ii) with x=px=p and y=n/py=n / p to obtain that f(n)f(n) divides (p1)yn1f(p)=(p1)yn1pp1(p-1) y^{n-1} f(p)=(p-1) y^{n-1} p^{p-1}. Write f(n)=Pf(n)=\ell P where \ell is coprime to nn and PP is a product of primes dividing nn. Since \ell divides (p1)yn1pp1(p-1) y^{n-1} p^{p-1} and is coprime to yn1pp1y^{n-1} p^{p-1}, it divides p1p-1; hence d()<pd(\ell) \leq \ell<p. But (i) gives n=d(f(n))=d(P)n=d(f(n))=d(\ell P), and d(P)=d()d(P)d(\ell P)=d(\ell) d(P) as \ell and PP are coprime. Therefore d()d(\ell) is a divisor of nn less than pp, meaning that =1\ell=1 and proving the claim.

Now (1) is immediate for prime powers. If pp is a prime and a1a \geq 1, by the above the only prime factor of f(pa)f\left(p^{a}\right) is pp (a prime factor does exist as f(pa)>1f\left(p^{a}\right)>1). So f(pa)=pbf\left(p^{a}\right)=p^{b} for some b1b \geq 1, and (i) yields pa=d(f(pa))=d(pb)=b+1p^{a}=d\left(f\left(p^{a}\right)\right)=d\left(p^{b}\right)=b+1. Hence f(pa)=ppa1f\left(p^{a}\right)=p^{p^{a}-1}, as needed.

Let us finally show that (1) is true for a general n>1n>1 with prime factorization n=p1a1pkakn=p_{1}^{a_{1}} \cdots p_{k}^{a_{k}}. We saw that the prime factorization of f(n)f(n) has the form f(n)=p1b1pkbkf(n)=p_{1}^{b_{1}} \cdots p_{k}^{b_{k}}. For i=1,,ki=1, \ldots, k, set x=piaix=p_{i}^{a_{i}} and y=n/xy=n / x in (ii) to infer that f(n)f(n) divides (piai1)yn1f(piai)\left(p_{i}^{a_{i}}-1\right) y^{n-1} f\left(p_{i}^{a_{i}}\right). Hence pibip_{i}^{b_{i}} divides (piai1)yn1f(piai)\left(p_{i}^{a_{i}}-1\right) y^{n-1} f\left(p_{i}^{a_{i}}\right), and because pibip_{i}^{b_{i}} is coprime to (piai1)yn1\left(p_{i}^{a_{i}}-1\right) y^{n-1}, it follows that pibip_{i}^{b_{i}} divides f(piai)=pipiai1f\left(p_{i}^{a_{i}}\right)=p_{i}^{p_{i}^{a_{i}}-1}. So bipiai1b_{i} \leq p_{i}^{a_{i}}-1 for all i=1,,ki=1, \ldots, k. Combined with (i), these conclusions imply
p1a1pkak=n=d(f(n))=d(p1b1pkbk)=(b1+1)(bk+1)p1a1pkak p_{1}^{a_{1}} \cdots p_{k}^{a_{k}}=n=d(f(n))=d\left(p_{1}^{b_{1}} \cdots p_{k}^{b_{k}}\right)=\left(b_{1}+1\right) \cdots\left(b_{k}+1\right) \leq p_{1}^{a_{1}} \cdots p_{k}^{a_{k}}
Hence all inequalities bipiai1b_{i} \leq p_{i}^{a_{i}}-1 must be equalities, i=1,,ki=1, \ldots, k, implying that (1) holds true. The proof is complete.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.