Maths Olympiad Prep

Track / Stage 10 / 6 of 32 #2578 of 2604

Problem 2578

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

For every n∈Nn \in \mathbb{N} let d(n)d(n) denote the number of (positive) divisors of nn. Find all functions f:N→Nf: \mathbb{N} \rightarrow \mathbb{N} with the following properties:
(i) d(f(x))=xd(f(x))=x for all x∈Nx \in \mathbb{N};
(ii) f(xy)f(x y) divides (x−1)yxy−1f(x)(x-1) y^{x y-1} f(x) for all x,y∈Nx, y \in \mathbb{N}.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

There is a unique solution: the function f:N→Nf: \mathbb{N} \rightarrow \mathbb{N} defined by f(1)=1f(1)=1 and
f(n)=p1p1a1−1p2p2a2−1⋯pkpkak−1 where n=p1a1p2a2⋯pkak 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:N→Nf: \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(p1b1⋯pkbk)=(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)=qp−1f(p)=q^{p-1} for some prime qq; in particular f(2)=q2−1=qf(2)=q^{2-1}=q is a prime. We prove that f(p)=pp−1f(p)=p^{p-1} for all primes pp.

Suppose that pp is odd and f(p)=qp−1f(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 (2−1)p2p−1f(2)=p2p−1f(2)(2-1) p^{2 p-1} f(2)=p^{2 p-1} f(2) and (p−1)22p−1f(p)=(p−1)22p−1qp−1(p-1) 2^{2 p-1} f(p)=(p-1) 2^{2 p-1} q^{p-1}. If q≠pq \neq p then the odd prime pp does not divide (p−1)22p−1qp−1(p-1) 2^{2 p-1} q^{p-1}, hence the greatest common divisor of p2p−1f(2)p^{2 p-1} f(2) and (p−1)22p−1qp−1(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)=pp−1f(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 (p−1)yn−1f(p)=(p−1)yn−1pp−1(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 (p−1)yn−1pp−1(p-1) y^{n-1} p^{p-1} and is coprime to yn−1pp−1y^{n-1} p^{p-1}, it divides p−1p-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 a≥1a \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 b≥1b \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)=ppa−1f\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=p1a1⋯pkakn=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)=p1b1⋯pkbkf(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 (piai−1)yn−1f(piai)\left(p_{i}^{a_{i}}-1\right) y^{n-1} f\left(p_{i}^{a_{i}}\right). Hence pibip_{i}^{b_{i}} divides (piai−1)yn−1f(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 (piai−1)yn−1\left(p_{i}^{a_{i}}-1\right) y^{n-1}, it follows that pibip_{i}^{b_{i}} divides f(piai)=pipiai−1f\left(p_{i}^{a_{i}}\right)=p_{i}^{p_{i}^{a_{i}}-1}. So bi≤piai−1b_{i} \leq p_{i}^{a_{i}}-1 for all i=1,…,ki=1, \ldots, k. Combined with (i), these conclusions imply
p1a1⋯pkak=n=d(f(n))=d(p1b1⋯pkbk)=(b1+1)⋯(bk+1)≤p1a1⋯pkak 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 bi≤piai−1b_{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 reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.