Maths Olympiad Prep

Library / /1 of 2

Number theory Difficulty 8.8 Shortlist Prove it India

Let g:NNg: \mathbb{N} \to \mathbb{N} be a bijective function and suppose that f:NNf: \mathbb{N} \to \mathbb{N} is a function such that:
• For all naturals xx, f2023(x)=xf^{2023}(x) = x
• For all naturals x,yx, y such that xyx \mid y, we have f(x)g(y)f(x) \mid g(y).
Prove that f(x)=xf(x) = x.

Solution

Claim 0 ff is bijective.
Proof. First, it is easy to see that ff is surjective, since for any given xNx \in \mathbb{N}, fn1(x)f^{n-1}(x) exists and f(fn1(x))=xf(f^{n-1}(x)) = x. Now, assume f(x)=f(y)f(x) = f(y). Choose m=x2023m = x^{2023} and n=y2023n = y^{2023}. Thus, fm(x)=xf^m(x) = x and fn(y)=yf^n(y) = y, and note that
f(x)=f(y)    fmn1(f(x))=fmn1(f(y))    (fm)n(x)=(fn)m(y)    x=y \begin{align*} f(x) = f(y) &\implies f^{mn-1}(f(x)) = f^{mn-1}(f(y)) \\ &\implies (f^m)^n(x) = (f^n)^m(y) \\ &\implies x = y \end{align*}
Hence, ff is injective, and therefore, ff is bijective too.

Claim 1 fa(x)=fb(x)=x    fgcd(a,b)(x)=xf^a(x) = f^b(x) = x \implies f^{\gcd(a,b)}(x) = x.
Proof. Let dd be the smallest positive integer such that fd(x)=xf^d(x) = x. By Euclidean algorithm, dad \mid a and dbd \mid b. Therefore dgcd(a,b)d \mid \gcd(a, b), and so fgcd(a,b)(x)=xf^{\gcd(a,b)}(x) = x. \square

Claim 3 For every x,y,nNx, y, n \in \mathbb{N}, xy    fn(x)fn(y)x | y \implies f^n(x) | f^n(y)
Proof. This follows by using the second condition repeatedly. \square

Claim 4 For every x,yNx, y \in \mathbb{N}, xyf(x)f(y)x | y \Longleftrightarrow f(x) | f(y).
Proof. It suffices to prove f(x)f(y)    xyf(x) | f(y) \implies x | y. To this end, suppose fm(x)=xf^m(x) = x and fn(y)=yf^n(y) = y. Using the previous claim, we have
f(x)f(y)    fmn1(f(x))fmn1(f(y))    (fm)n(x)(fn)m(y)    xy, f(x) | f(y) \implies f^{mn-1}(f(x)) | f^{mn-1}(f(y)) \implies (f^m)^n(x) | (f^n)^m(y) \implies x | y,
as claimed.

Define d(x)d(x) to be the number of positive divisors of xx.

Claim 5 For all xNx \in \mathbb{N}, d(x)=d(f(x))d(x) = d(f(x)).
Proof. For any given xx, let AA and BB be the sets of positive divisors of xx and f(x)f(x) respectively. Clearly, by Claim 4 and bijectivity, ff, when restricted to AA, is a bijection from AA to BB, whence the claim follows. \square

Claim 6 For any given nn, let its prime factorisation be n=p1a1p2a2pjajn = p_1^{a_1} \cdot p_2^{a_2} \cdots p_j^{a_j}. Then,
f(n)=f(p1)a1f(p2)a2f(pj)aj f(n) = f(p_1)^{a_1} \cdot f(p_2)^{a_2} \cdots f(p_j)^{a_j}
where all f(pi)f(p_i)'s are distinct primes.
Proof. We will prove this by strong induction on ai\sum a_i. For n=1n = 1, ak=0\sum a_k = 0. Also, d(1)=1=d(f(1))d(1) = 1 = d(f(1)). But 1 is the only natural number with only 1 divisor. So f(1)f(1) is 1.
Now, if nn is a prime, then d(n)=2=d(f(n))d(n) = 2 = d(f(n)), so f(n)f(n) is also prime. Also, it is clear that no two f(pi)f(p_i)'s can be equal as ff is bijective.
Now, let's assume that the above statement is true for all nn such that ai<k\sum a_i < k. For nn with ai=k\sum a_i = k, and k2k \ge 2, let AA (resp. BB) be the set of positive divisors of nn (resp. f(n)f(n)). Clearly, by Claim 4, ff, when restricted to AA, is a bijection from AA to BB. Since all elements of AA are divisors of nn, all elements of AA, except nn itself, have ai<k\sum a_i < k, so the stated claim is true for all of them.
Now, if nn is a prime power, say pkp^k, then since A={1,p,p2,,pk}A = \{1, p, p^2, \dots, p^k\} (as f(p)f(p) is prime), BB must be {1,f(p),f(p)2,,f(p)k1,f(n)}\{1, f(p), f(p)^2, \dots, f(p)^{k-1}, f(n)\}. But since BB is the set of divisors of f(n)f(n), the only possible value of f(n)f(n) is f(p)kf(p)^k.
Now, if nn has multiple prime factors, let's say its prime factorisation is n=p1a1p2a2pjajn = p_1^{a_1} \cdot p_2^{a_2} \cdots p_j^{a_j}. We have
piaiA,ij    f(piai)B,ij    f(pi)aiB,ij p_i^{a_i} \in A, \forall i \le j \implies f(p_i^{a_i}) \in B, \forall i \le j \implies f(p_i)^{a_i} \in B, \forall i \le j
by the induction hypothesis. Therefore f(pi)ai\prod f(p_i)^{a_i} must also be in BB, since all f(pi)f(p_i)'s are distinct primes. But we know from our induction hypothesis that this is not the image of any of the proper divisors of nn under ff, and BB is the image of AA under ff, hence f(pi)ai=f(n)\prod f(p_i)^{a_i} = f(n) in this case as well. \square

Now, consider any prime pp. We know that fp2023(f(p))=f(p)f^{p^{2023}}(f(p)) = f(p) and fp2023(f(p))=f(p)    fgcd(p2023,f(p)2023)(f(p))=f(p)f^{p^{2023}}(f(p)) = f(p) \implies f^{\gcd(p^{2023}, f(p)^{2023})}(f(p)) = f(p). But p,f(p)p, f(p) are primes, thus gcd\gcd is 1 unless p=f(p)p = f(p) but if f1(f(p))=f(p)f^1(f(p)) = f(p), then f(p)=pf(p) = p.
Now, by multiplicativity of ff, we get that f(x)=xf(x) = x for all xx. \square

Solution 2:

Claim 2 For all xNx \in \mathbb{N}, d(x)d(g(x))d(x) \le d(g(x)).
Proof. ff is an injective function from set of divisors of xx to set of divisors of g(x)g(x). \square

If g(n)=1g(n) = 1, then d(g(n))=1    d(n)1    d(n)=1    g(1)=1d(g(n)) = 1 \implies d(n) \le 1 \implies d(n) = 1 \implies g(1) = 1. Further, f(1)g(1)=1    f(1)=1f(1) | g(1) = 1 \implies f(1) = 1.

Claim 3 For any prime pp, f(p)=g(p)=pf(p) = g(p) = p.
Proof. Let g(q)=pg(q) = p. Then d(q)d(p)=2d(q) \le d(p) = 2 and q1q \ne 1 by injectivity of gg, so qq is also a prime. Further, f(q)g(q)=pf(q) | g(q) = p and f(q)1f(q) \ne 1 by injectivity     f(q)=p\implies f(q) = p. Now,
fp2023(q)=fp20231(p)=f1(p)=q=fq2023(q)    fgcd(p2023,q2023)(q)=q f^{p^{2023}}(q) = f^{p^{2023}-1}(p) = f^{-1}(p) = q = f^{q^{2023}}(q) \implies f^{\gcd(p^{2023}, q^{2023})}(q) = q
Now, if pqp \ne q, we get a contradiction. Hence q=pq = p, and so f(q)=g(q)=pf(q) = g(q) = p. \square

Now we use strong induction on d(n)d(n) to prove f(n)=g(n)=nf(n) = g(n) = n. Base cases are d(n)=1d(n) = 1 and d(n)=2d(n) = 2; these are done since f(1)=g(1)=1f(1) = g(1) = 1 and f(p)=g(p)=pf(p) = g(p) = p for primes pp.
Now assume the claim is true for all mm such that d(m)kd(m) \le k, for some k2k \ge 2. Let nn satisfy d(n)=k+1d(n) = k+1. Suppose g(y)=ng(y) = n. By Claim 2, d(y)d(n)d(y) \le d(n). If d(y)<d(n)d(y) < d(n), by induction hypothesis we have y=g(y)=ny = g(y) = n, contradiction! Hence d(y)=d(n)d(y) = d(n). We have two cases:

Case I: yy is not a power of a prime.
Let y=p1a1p2a2pjajy = p_1^{a_1} \cdot p_2^{a_2} \cdots p_j^{a_j}. Then each piaip_i^{a_i} has ai+1<d(y)=k+1a_i + 1 < d(y) = k + 1 divisors, so f(piai)=piaif(p_i^{a_i}) = p_i^{a_i}. Therefore piaig(y)=np_i^{a_i} | g(y) = n for all i    yni \implies y | n. But, we have d(y)=d(n)d(y) = d(n), so y=ny = n, and g(n)=ng(n) = n.

Case II: y=pay = p^a for some prime pp.
Since d(y)=k+1d(y) = k+1, a=k2a = k \ge 2. Then d(pk1)=k    f(pk1)=pk1d(p^{k-1}) = k \implies f(p^{k-1}) = p^{k-1} by induction hypothesis     pk1g(y)=n\implies p^{k-1} | g(y) = n. If some prime qpq \ne p divides nn, then pk1qn    d(n)d(pk1q)=2k>k+1p^{k-1}q | n \implies d(n) \ge d(p^{k-1}q) = 2k > k + 1 since k2k \ge 2, contradiction! Therefore n=pbn = p^b, and d(n)=k+1    n=pk=yd(n) = k+1 \implies n = p^k = y. Hence g(n)=ng(n) = n in this case as well.
Then f(n)g(n)=nf(n) | g(n) = n, so f(n)n    d(f(n))<d(n)    f(n)=f(f(n))f(n) \ne n \implies d(f(n)) < d(n) \implies f(n) = f(f(n)) by induction hypothesis     f(n)=n\implies f(n) = n by injectivity, contradiction! Hence f(n)=g(n)=nf(n) = g(n) = n, and we are done by induction.

Solution 3:

Claim 2 f=gf = g
Proof. Same as Claim 2 in Solution A1. \square

Claim 3 d(f(x))=d(x)d(f(x)) = d(x).
Proof. xy    f(x)f(y)x|y \implies f(x)|f(y) and ff is bijective. Thus, d(f(x))d(x)d(f(x)) \ge d(x).
Now,
d(x)d(f(x))d(f2(x))d(fx2023(x))=d(x)    d(f(x))=d(x) d(x) \le d(f(x)) \le d(f^2(x)) \le \dots \le d(f^{x^{2023}}(x)) = d(x) \implies d(f(x)) = d(x)

Claim 4 For all primes pp, f(p)=pf(p) = p.
Proof. Let q=f1(p)q = f^{-1}(p). By Claim 3, qq is also a prime. Now,
fp2023(q)=fp20231(p)=f1(p)=q=fq2023(q)    fgcd(p2023,q2023)(q)=q f^{p^{2023}}(q) = f^{p^{2023}-1}(p) = f^{-1}(p) = q = f^{q^{2023}}(q) \implies f^{\gcd(p^{2023}, q^{2023})}(q) = q
Now, if pqp \ne q, we get a contradiction. \square

Claim 5 f(pα)=pαf(p^\alpha) = p^\alpha for αN\alpha \in \mathbb{N}.
Proof. Let t=f1(pα)t = f^{-1}(p^\alpha). Now, if qq is a prime such that qtq|t, then f(q)pα    qp    p=qf(q)|p^\alpha \implies q|p \implies p = q. Thus, tt is a power of pp. Let t=pαt = p^{\alpha'} but by Claim 3, α+1=α+1    t=pα\alpha + 1 = \alpha' + 1 \implies t = p^\alpha. Thus, f(pα)=pαf(p^\alpha) = p^\alpha. \square

Claim 6 xf(x)x|f(x) for all xx.
Proof. Let pαxp^\alpha|x, for any prime pp, then f(pα)f(x)    pαf(x)f(p^\alpha)|f(x) \implies p^\alpha|f(x). Going over all prime divisors of xx, we get the desired result. \square

xf(x)f2(x)fx2023(x)x    f(x)=x x | f(x) | f^2(x) | \dots | f^{x^{2023}}(x) | x \implies f(x) = x
This uses the fact that f(x)f(x) is cyclic for all xx but this can easily be avoided as well that for a bijective function ff, we have f(x)xf(x) \ge x. So consider the smallest xx such that f(x)xf(x) \neq x. Now, clearly x>f1(x)x > f^{-1}(x) since for all xx lesser than it, f(x)=xf(x) = x. This is essentially how we proved that f=gf = g. Thus, we are done.

Solution 4:

Claim 2 d(x)d(g(x))d(x) \le d(g(x))
Proof. Same as Claim 2 in Solution A2

Claim 3 f(p)=pf(p) = p for all primes pp.
Proof. Same as Claim 3 in Solution A2

Claim 4 f(pα)=g(pα)=pαf(p^\alpha) = g(p^\alpha) = p^\alpha for all primes pp and αN\alpha \in \mathbb{N}.
Proof. We proceed by induction. The base case is already done. Now, assume that k<α\forall k < \alpha, we have f(pk)=g(pk)=pkf(p^k) = g(p^k) = p^k.
Let t=g1(pα)t = g^{-1}(p^\alpha). Now, if qq is a prime such that qtq | t, then f(q)pα    qp    p=qf(q) | p^\alpha \implies q | p \implies p = q. Thus, tt is a power of pp. Let t=pαt = p^{\alpha'}. Now, by Claim 2, αα\alpha' \le \alpha but α<α\forall \alpha' < \alpha, g(pα)=pαg(p^{\alpha'}) = p^{\alpha'}. Thus, α=α\alpha = \alpha'. Thus, g(pα)=pαg(p^\alpha) = p^\alpha.
Now, f(pα)pαf(p^\alpha) | p^\alpha. Thus, f(pα)=psf(p^\alpha) = p^s for some sαs \le \alpha but we know that f1(ps)=psf^{-1}(p^s) = p^s for all s<αs < \alpha. Thus, s=αs = \alpha.
Thus, f(pα)=g(pα)=pαf(p^\alpha) = g(p^\alpha) = p^\alpha as desired.

Claim 5 xg(x)x|g(x) for all xNx \in \mathbb{N}.
Proof. Let pαxp^\alpha|x, then f(pα)g(x)    pαg(x)f(p^\alpha)|g(x) \implies p^\alpha|g(x). Going over all prime divisors of xx, we get that xg(x)x|g(x) \square

Now, we have that xg(x)x \le g(x) for all xx. So, consider the smallest xx such that xg(x)x \neq g(x). Then, we get that g1(x)>xg^{-1}(x) > x since y<x,g(y)=y\forall y < x, g(y) = y. This is a contradiction since g1(x)>g(g1(x))g^{-1}(x) > g(g^{-1}(x)).
Thus, g(x)=xg(x) = x for all xx. Now, we have that xx    f(x)xx|x \implies f(x)|x for all xx and in particular that f(x)xf(x) \le x for all xx. Now, consider the smallest xx, such that f(x)xf(x) \neq x. Then, f(x)>xf(x) > x since f1(y)=yf^{-1}(y) = y for all y<xy < x.
Thus, f(x)=xf(x) = x for all xx and our conclusion follows.

The general idea for this conclusion and Claim 2 in Solution A1 is that if a,ba, b are bijective on N\mathbb{N} and a(x)b(x)a(x) \le b(x) for all xx implies that a=ba = b. We earlier use this with f=af = a and g=bg = b. Now, we use a=ida = id and b=gb = g. Then finally with a=fa = f and b=idb = id.

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.