Olympiad Maths Prep

Track / Stage 6 / 86 of 400 #1086 of 2000

Problem 1086

National olympiad, first round
Number theory Difficulty 6.1 Prove it

Let ff be a function from N\mathbb{N}^{\star} to N\mathbb{N}^{\star} such that, for any pair of strictly positive integers mm and nn, exactly one of the integers

f(m+1),,f(m+f(n)) f(m+1), \ldots, f(m+f(n))

is divisible by nn. Show that f(n)=nf(n)=n for infinitely many integers nn.

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

Let n1n \geqslant 1. For any integer m1m \geqslant 1, each of the two sets

{f(m+1),,f(m+f(n))} and {f(m+2),,f(m+1+f(n))} \{f(m+1), \ldots, f(m+f(n))\} \text { and }\{f(m+2), \ldots, f(m+1+f(n))\}

contains exactly one integer divisible by nn. Thus, if nf(m+1)n \mid f(m+1), none of the integers f(m+2),,f(m+f(n))f(m+2), \ldots, f(m+f(n)) is divisible by nn, so nn divides f(m+1+f(n))f(m+1+f(n)). Similarly, if nn does not divide f(m+1)f(m+1), nn divides one of the integers f(m+2),,f(m+f(n))f(m+2), \ldots, f(m+f(n)), so nn does not divide f(m+1+f(n))f(m+1+f(n)). In conclusion, for any integer m2m \geqslant 2, nn divides f(m)f(m) if and only if nn divides f(m+f(n))f(m+f(n)). This means that for any pair of integers (x,y)(x, y) greater than or equal to 22, nn divides f(x)f(x) and f(y)f(y) if and only if f(n)f(n) divides xyx-y.

Now let k1k \geqslant 1 be an integer and xx an integer such that knf(x)k n \mid f(x). Then knk n also divides f(x+f(kn))f(x+f(k n)), so nn divides f(x)f(x) and f(x+f(kn))f(x+f(k n)). It follows that f(n)f(n) divides f(kn)f(k n) for any integer k1k \geqslant 1.

In particular, f(n)f(n) divides f(n)f(n) and f(2n)f(2 n), so f(f(n))f(f(n)) divides 2nn=n2 n - n = n. Notice that if nn divides f(n)f(n), then there exists an integer kk such that f(n)=knf(n) = k n. But then f(kn)=f(f(n))nf(n)f(kn)f(k n) = f(f(n)) \mid n \mid f(n) \mid f(k n), so f(kn)=f(n)f(k n) = f(n), hence nf(n)=f(kn)=f(f(n))nn \mid f(n) = f(k n) = f(f(n)) \mid n and f(n)=nf(n) = n. Thus, it suffices to find integers nn such that f(n)=nf(n) = n.

On the other hand, since f(f(n))f(f(n)) divides nn, we have in particular for any prime number, f(f(p))f(f(p)) divides pp, so f(f(p)){1,p}f(f(p)) \in \{1, p\}. Suppose xx is such that f(x)=1f(x) = 1. Then for any integer m1m \geqslant 1, the set {f(m+1),,f(m+f(x))}\{f(m+1), \ldots, f(m+f(x))\} is reduced to {f(m+1)}\{f(m+1)\}, so xx divides f(m+1)f(m+1) for all mm. In particular, xx divides f(x)=1f(x) = 1, so x=1x = 1. Thus, f(p)1f(p) \neq 1 and f(f(p))1f(f(p)) \neq 1, so f(f(p))=pf(f(p)) = p for all prime numbers pp.

If pp divides f(p)f(p) for infinitely many prime numbers pp, then according to the previous discussion, f(p)=pf(p) = p for infinitely many prime numbers, which gives the desired result. Otherwise, for all sufficiently large prime numbers pp, f(p)f(p) and pp are coprime. We then have f(p)f(pf(p))f(p) \mid f(p f(p)) and p=f(f(p))f(pf(p))p = f(f(p)) \mid f(p f(p)), so pf(p)f(pf(p))p f(p) \mid f(p f(p)) and f(pf(p))=pf(p)f(p f(p)) = p f(p).

It remains to see that pf(p)p f(p) can take infinitely many different values. For this, we assume that we have constructed kk different integers of the form pf(p)p f(p) and we choose qq a prime number strictly larger than these kk integers. Then qf(q)q f(q) is indeed a distinct integer from the previous kk.

Thus, ff has infinitely many fixed points.

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