Maths Olympiad Prep

Library / /141 of 520

Number theory Difficulty 6.0 AIME, harder Find the answer

Let Z>0\mathbb{Z}_{>0} denote the set of positive integers. For any positive integer kk, a function f:Z>0Z>0f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0} is called kk-good if gcd(f(m)+n,f(n)+m)k\operatorname{gcd}(f(m)+n, f(n)+m) \leqslant k for all mnm \neq n. Find all kk such that there exists a kk-good function. (Canada)

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

For any function f:Z>0Z>0f: \mathbb{Z}_{>0} \rightarrow \mathbb{Z}_{>0}, let Gf(m,n)=gcd(f(m)+n,f(n)+m)G_{f}(m, n)=\operatorname{gcd}(f(m)+n, f(n)+m). Note that a kk-good function is also (k+1)(k+1)-good for any positive integer kk. Hence, it suffices to show that there does not exist a 1-good function and that there exists a 2-good function. We first show that there is no 1-good function. Suppose that there exists a function ff such that Gf(m,n)=1G_{f}(m, n)=1 for all mnm \neq n. Now, if there are two distinct even numbers mm and nn such that f(m)f(m) and f(n)f(n) are both even, then 2Gf(m,n)2 \mid G_{f}(m, n), a contradiction. A similar argument holds if there are two distinct odd numbers mm and nn such that f(m)f(m) and f(n)f(n) are both odd. Hence we can choose an even mm and an odd nn such that f(m)f(m) is odd and f(n)f(n) is even. This also implies that 2Gf(m,n)2 \mid G_{f}(m, n), a contradiction. We now construct a 2-good function. Define f(n)=2g(n)+1n1f(n)=2^{g(n)+1}-n-1, where gg is defined recursively by g(1)=1g(1)=1 and g(n+1)=(2g(n)+1)!g(n+1)=\left(2^{g(n)+1}\right)!. For any positive integers m>nm>n, set
A=f(m)+n=2g(m)+1m+n1,B=f(n)+m=2g(n)+1n+m1 A=f(m)+n=2^{g(m)+1}-m+n-1, \quad B=f(n)+m=2^{g(n)+1}-n+m-1
We need to show that gcd(A,B)2\operatorname{gcd}(A, B) \leqslant 2. First, note that A+B=2g(m)+1+2g(n)+12A+B=2^{g(m)+1}+2^{g(n)+1}-2 is not divisible by 4, so that 4gcd(A,B)4 \nmid \operatorname{gcd}(A, B). Now we suppose that there is an odd prime pp for which pgcd(A,B)p \mid \operatorname{gcd}(A, B) and derive a contradiction. We first claim that 2g(m1)+1B2^{g(m-1)+1} \geqslant B. This is a rather weak bound; one way to prove it is as follows. Observe that g(k+1)>g(k)g(k+1)>g(k) and hence 2g(k+1)+12g(k)+1+12^{g(k+1)+1} \geqslant 2^{g(k)+1}+1 for every positive integer kk. By repeatedly applying this inequality, we obtain 2g(m1)+12g(n)+1+(m1)n=B2^{g(m-1)+1} \geqslant 2^{g(n)+1}+(m-1)-n=B. Now, since pBp \mid B, we have p1<B2g(m1)+1p-1<B \leqslant 2^{g(m-1)+1}, so that p1(2g(m1)+1)!=g(m)p-1 \mid\left(2^{g(m-1)+1}\right)!=g(m). Hence 2g(m)1(modp)2^{g(m)} \equiv 1(\bmod p), which yields A+B2g(n)+1(modp)A+B \equiv 2^{g(n)+1}(\bmod p). However, since pA+Bp \mid A+B, this implies that p=2p=2, a contradiction.

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: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.