Olympiad Maths Prep

Track / Stage 7 / 213 of 300 #1613 of 2000

Problem 1613

National olympiad second round; IMO P1/P4
Number theory Difficulty 7.4 Prove it

A function ff from the positive integers to the positive integers is called Canadian if it satisfies

gcd(f(f(x)),f(x+y))=gcd(x,y) \operatorname{gcd}(f(f(x)), f(x+y))=\operatorname{gcd}(x, y)

for all pairs of positive integers xx and yy.
Find all positive integers mm such that f(m)=mf(m)=m for all Canadian functions ff.

The text is already in English, so no translation is needed.

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

Define an mNm \in \mathbb{N} to be good if f(m)=mf(m)=m for all such ff. It will be shown that mm is good if and only if mm has two or more distinct prime divisors. Let P(x,y)P(x, y) denote the assertion

gcd(f(f(x)),f(x+y))=gcd(x,y) \operatorname{gcd}(f(f(x)), f(x+y))=\operatorname{gcd}(x, y)

for a pair x,yNx, y \in \mathbb{N}. Let xx be a positive integer with two or more distinct prime divisors and let pkp^{k} be largest power of one of these prime divisors such that pkxp^{k} \mid x. If x=pkqx=p^{k} \cdot q, then pkp^{k} and qq are relatively prime and x>pk,q>1x>p^{k}, q>1. By P(q,xq)P(q, x-q),

gcd(f(f(q)),f(xq+q))=gcd(f(f(q)),f(x))=gcd(q,xq)=q \operatorname{gcd}(f(f(q)), f(x-q+q))=\operatorname{gcd}(f(f(q)), f(x))=\operatorname{gcd}(q, x-q)=q

which implies that qf(x)q \mid f(x). By P(pk,xpk)P\left(p^{k}, x-p^{k}\right),

gcd(f(f(pk)),f(xpk+pk))=gcd(f(f(pk)),f(x))=gcd(pk,xpk)=pk \operatorname{gcd}\left(f\left(f\left(p^{k}\right)\right), f\left(x-p^{k}+p^{k}\right)\right)=\operatorname{gcd}\left(f\left(f\left(p^{k}\right)\right), f(x)\right)=\operatorname{gcd}\left(p^{k}, x-p^{k}\right)=p^{k}

which implies that pkf(x)p^{k} \mid f(x). Since pkp^{k} and qq are relatively prime, x=pkqx=p^{k} \cdot q divides f(x)f(x), which implies that f(x)xf(x) \geq x. Now assume for contradiction that f(x)>xf(x)>x. Let y=f(x)x>0y=f(x)-x>0 and note that, by P(x,y)P(x, y), it follows that

f(f(x))=gcd(f(f(x)),f(x+f(x)x))=gcd(x,f(x)x)=gcd(x,f(x)). f(f(x))=\operatorname{gcd}(f(f(x)), f(x+f(x)-x))=\operatorname{gcd}(x, f(x)-x)=\operatorname{gcd}(x, f(x)) .

Therefore f(f(x))xf(f(x)) \mid x and f(f(x))f(x)f(f(x)) \mid f(x). By P(x,x)P(x, x), it follows that

gcd(f(f(x)),f(2x))=gcd(x,x)=x \operatorname{gcd}(f(f(x)), f(2 x))=\operatorname{gcd}(x, x)=x

This implies that xf(f(x))x \mid f(f(x)), which when combined with the above result, yields that f(f(x))=xf(f(x))=x. Since xf(x)x \mid f(x) and xx is divisible by at least two distinct prime numbers, f(x)f(x) is also divisible by at least two distinct prime numbers. As shown previously, this implies that f(x)f(f(x))=xf(x) \mid f(f(x))=x, which is a contradiction since f(x)>xf(x)>x. Therefore f(x)=xf(x)=x for all positive integers xx with two or more distinct prime divisors.

Now it will be shown that all mNm \in \mathbb{N} such that either mm has one prime divisor or m=1m=1 are not good. In either case, let m=pkm=p^{k} where k0k \geq 0 and pp is a prime number and consider the function satisfying that f(pk)=pk+1,f(pk+1)=pkf\left(p^{k}\right)=p^{k+1}, f\left(p^{k+1}\right)=p^{k} and f(x)=xf(x)=x for all xpk,pk+1x \neq p^{k}, p^{k+1}. Note that this function also satisfies that f(f(x))=xf(f(x))=x for all positive integers xx. If x+ypk,pk+1x+y \neq p^{k}, p^{k+1}, then P(x,y)P(x, y) holds by the Euclidean

algorithm since f(f((x))=xf\left(f((x))=x\right. and f(x+y)=x+yf(x+y)=x+y. If x+y=pk+1x+y=p^{k+1}, then P(x,y)P(x, y) is equivalent to gcd(x,pk)=gcd(x,pk+1x)=gcd(x,pk+1)\operatorname{gcd}\left(x, p^{k}\right)=\operatorname{gcd}\left(x, p^{k+1}-x\right)=\operatorname{gcd}\left(x, p^{k+1}\right) for all x<pk+1x<p^{k+1} which holds since the greatest power of pp that can divide xx is pkp^{k}. If x+y=pkx+y=p^{k}, then P(x,y)P(x, y) is equivalent to gcd(x,pk+1)=gcd(x,pkx)=gcd(x,pk)\operatorname{gcd}\left(x, p^{k+1}\right)=\operatorname{gcd}\left(x, p^{k}-x\right)=\operatorname{gcd}\left(x, p^{k}\right) for all x<pkx<p^{k} which holds as shown above. Note that if m=1m=1 then this case cannot occur. Since this function satisfies P(x,y),mP(x, y), m is good if and only if mm has two or more distinct prime divisors.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.