Claim 0 f is bijective.
Proof. First, it is easy to see that f is surjective, since for any given x∈N, fn−1(x) exists and f(fn−1(x))=x. Now, assume f(x)=f(y). Choose m=x2023 and n=y2023. Thus, fm(x)=x and fn(y)=y, and note that
f(x)=f(y)⟹fmn−1(f(x))=fmn−1(f(y))⟹(fm)n(x)=(fn)m(y)⟹x=y
Hence, f is injective, and therefore, f is bijective too.
Claim 1 fa(x)=fb(x)=x⟹fgcd(a,b)(x)=x.
Proof. Let d be the smallest positive integer such that fd(x)=x. By Euclidean algorithm, d∣a and d∣b. Therefore d∣gcd(a,b), and so fgcd(a,b)(x)=x. □
Claim 3 For every x,y,n∈N, x∣y⟹fn(x)∣fn(y)
Proof. This follows by using the second condition repeatedly. □
Claim 4 For every x,y∈N, x∣y⟺f(x)∣f(y).
Proof. It suffices to prove f(x)∣f(y)⟹x∣y. To this end, suppose fm(x)=x and fn(y)=y. Using the previous claim, we have
f(x)∣f(y)⟹fmn−1(f(x))∣fmn−1(f(y))⟹(fm)n(x)∣(fn)m(y)⟹x∣y,
as claimed.
Define d(x) to be the number of positive divisors of x.
Claim 5 For all x∈N, d(x)=d(f(x)).
Proof. For any given x, let A and B be the sets of positive divisors of x and f(x) respectively. Clearly, by Claim 4 and bijectivity, f, when restricted to A, is a bijection from A to B, whence the claim follows. □
Claim 6 For any given n, let its prime factorisation be n=p1a1⋅p2a2⋯pjaj. Then,
f(n)=f(p1)a1⋅f(p2)a2⋯f(pj)aj
where all f(pi)'s are distinct primes.
Proof. We will prove this by strong induction on ∑ai. For n=1, ∑ak=0. Also, d(1)=1=d(f(1)). But 1 is the only natural number with only 1 divisor. So f(1) is 1.
Now, if n is a prime, then d(n)=2=d(f(n)), so f(n) is also prime. Also, it is clear that no two f(pi)'s can be equal as f is bijective.
Now, let's assume that the above statement is true for all n such that ∑ai<k. For n with ∑ai=k, and k≥2, let A (resp. B) be the set of positive divisors of n (resp. f(n)). Clearly, by Claim 4, f, when restricted to A, is a bijection from A to B. Since all elements of A are divisors of n, all elements of A, except n itself, have ∑ai<k, so the stated claim is true for all of them.
Now, if n is a prime power, say pk, then since A={1,p,p2,…,pk} (as f(p) is prime), B must be {1,f(p),f(p)2,…,f(p)k−1,f(n)}. But since B is the set of divisors of f(n), the only possible value of f(n) is f(p)k.
Now, if n has multiple prime factors, let's say its prime factorisation is n=p1a1⋅p2a2⋯pjaj. We have
piai∈A,∀i≤j⟹f(piai)∈B,∀i≤j⟹f(pi)ai∈B,∀i≤j
by the induction hypothesis. Therefore ∏f(pi)ai must also be in B, since all f(pi)'s are distinct primes. But we know from our induction hypothesis that this is not the image of any of the proper divisors of n under f, and B is the image of A under f, hence ∏f(pi)ai=f(n) in this case as well. □
Now, consider any prime p. We know that fp2023(f(p))=f(p) and fp2023(f(p))=f(p)⟹fgcd(p2023,f(p)2023)(f(p))=f(p). But p,f(p) are primes, thus gcd is 1 unless p=f(p) but if f1(f(p))=f(p), then f(p)=p.
Now, by multiplicativity of f, we get that f(x)=x for all x. □
Solution 2:
Claim 2 For all x∈N, d(x)≤d(g(x)).
Proof. f is an injective function from set of divisors of x to set of divisors of g(x). □
If g(n)=1, then d(g(n))=1⟹d(n)≤1⟹d(n)=1⟹g(1)=1. Further, f(1)∣g(1)=1⟹f(1)=1.
Claim 3 For any prime p, f(p)=g(p)=p.
Proof. Let g(q)=p. Then d(q)≤d(p)=2 and q=1 by injectivity of g, so q is also a prime. Further, f(q)∣g(q)=p and f(q)=1 by injectivity ⟹f(q)=p. Now,
fp2023(q)=fp2023−1(p)=f−1(p)=q=fq2023(q)⟹fgcd(p2023,q2023)(q)=q
Now, if p=q, we get a contradiction. Hence q=p, and so f(q)=g(q)=p. □
Now we use strong induction on d(n) to prove f(n)=g(n)=n. Base cases are d(n)=1 and d(n)=2; these are done since f(1)=g(1)=1 and f(p)=g(p)=p for primes p.
Now assume the claim is true for all m such that d(m)≤k, for some k≥2. Let n satisfy d(n)=k+1. Suppose g(y)=n. By Claim 2, d(y)≤d(n). If d(y)<d(n), by induction hypothesis we have y=g(y)=n, contradiction! Hence d(y)=d(n). We have two cases:
Case I: y is not a power of a prime.
Let y=p1a1⋅p2a2⋯pjaj. Then each piai has ai+1<d(y)=k+1 divisors, so f(piai)=piai. Therefore piai∣g(y)=n for all i⟹y∣n. But, we have d(y)=d(n), so y=n, and g(n)=n.
Case II: y=pa for some prime p.
Since d(y)=k+1, a=k≥2. Then d(pk−1)=k⟹f(pk−1)=pk−1 by induction hypothesis ⟹pk−1∣g(y)=n. If some prime q=p divides n, then pk−1q∣n⟹d(n)≥d(pk−1q)=2k>k+1 since k≥2, contradiction! Therefore n=pb, and d(n)=k+1⟹n=pk=y. Hence g(n)=n in this case as well.
Then f(n)∣g(n)=n, so f(n)=n⟹d(f(n))<d(n)⟹f(n)=f(f(n)) by induction hypothesis ⟹f(n)=n by injectivity, contradiction! Hence f(n)=g(n)=n, and we are done by induction.
Solution 3:
Claim 2 f=g
Proof. Same as Claim 2 in Solution A1. □
Claim 3 d(f(x))=d(x).
Proof. x∣y⟹f(x)∣f(y) and f is bijective. Thus, d(f(x))≥d(x).
Now,
d(x)≤d(f(x))≤d(f2(x))≤⋯≤d(fx2023(x))=d(x)⟹d(f(x))=d(x)
Claim 4 For all primes p, f(p)=p.
Proof. Let q=f−1(p). By Claim 3, q is also a prime. Now,
fp2023(q)=fp2023−1(p)=f−1(p)=q=fq2023(q)⟹fgcd(p2023,q2023)(q)=q
Now, if p=q, we get a contradiction. □
Claim 5 f(pα)=pα for α∈N.
Proof. Let t=f−1(pα). Now, if q is a prime such that q∣t, then f(q)∣pα⟹q∣p⟹p=q. Thus, t is a power of p. Let t=pα′ but by Claim 3, α+1=α′+1⟹t=pα. Thus, f(pα)=pα. □
Claim 6 x∣f(x) for all x.
Proof. Let pα∣x, for any prime p, then f(pα)∣f(x)⟹pα∣f(x). Going over all prime divisors of x, we get the desired result. □
x∣f(x)∣f2(x)∣…∣fx2023(x)∣x⟹f(x)=x
This uses the fact that f(x) is cyclic for all x but this can easily be avoided as well that for a bijective function f, we have f(x)≥x. So consider the smallest x such that f(x)=x. Now, clearly x>f−1(x) since for all x lesser than it, f(x)=x. This is essentially how we proved that f=g. Thus, we are done.
Solution 4:
Claim 2 d(x)≤d(g(x))
Proof. Same as Claim 2 in Solution A2
Claim 3 f(p)=p for all primes p.
Proof. Same as Claim 3 in Solution A2
Claim 4 f(pα)=g(pα)=pα for all primes p and α∈N.
Proof. We proceed by induction. The base case is already done. Now, assume that ∀k<α, we have f(pk)=g(pk)=pk.
Let t=g−1(pα). Now, if q is a prime such that q∣t, then f(q)∣pα⟹q∣p⟹p=q. Thus, t is a power of p. Let t=pα′. Now, by Claim 2, α′≤α but ∀α′<α, g(pα′)=pα′. Thus, α=α′. Thus, g(pα)=pα.
Now, f(pα)∣pα. Thus, f(pα)=ps for some s≤α but we know that f−1(ps)=ps for all s<α. Thus, s=α.
Thus, f(pα)=g(pα)=pα as desired.
Claim 5 x∣g(x) for all x∈N.
Proof. Let pα∣x, then f(pα)∣g(x)⟹pα∣g(x). Going over all prime divisors of x, we get that x∣g(x) □
Now, we have that x≤g(x) for all x. So, consider the smallest x such that x=g(x). Then, we get that g−1(x)>x since ∀y<x,g(y)=y. This is a contradiction since g−1(x)>g(g−1(x)).
Thus, g(x)=x for all x. Now, we have that x∣x⟹f(x)∣x for all x and in particular that f(x)≤x for all x. Now, consider the smallest x, such that f(x)=x. Then, f(x)>x since f−1(y)=y for all y<x.
Thus, f(x)=x for all x and our conclusion follows.
The general idea for this conclusion and Claim 2 in Solution A1 is that if a,b are bijective on N and a(x)≤b(x) for all x implies that a=b. We earlier use this with f=a and g=b. Now, we use a=id and b=g. Then finally with a=f and b=id.