Maths Olympiad Prep

Track / Stage 7 / 95 of 300 #1975 of 2444

Problem 1975

National Olympiad second round; IMO P1/P4
Number theory Difficulty 7.3 Prove it Junior Balkan Mathematical Olympiad · JBMO

Find the largest integer kk (k2k \geq 2), for which there exists an integer nn (nkn \geq k) such that from any collection of nn consecutive positive integers one can always choose kk numbers, which verify the following conditions:
1. each chosen number is not divisible by 66, by 77 and by 88;
2. the positive difference of any two different chosen numbers is not divisible by at least one of the numbers 66, 77 or 88.

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

Solution:
An integer is divisible by 66, 77 and 88 if and only if it is divisible by their Least Common Multiple, which equals 6×7×4=1686 \times 7 \times 4 = 168.
Let nn be a positive integer and let AA be an arbitrary set of nn consecutive positive integers. Replace each number aia_{i} from AA with its remainder rir_{i} (mod 168168). The number aia_{i} is divisible by 66 (77 or 88) if and only if its remainder rir_{i} is divisible by 66 (respectively 77 or 88). The difference aiaj|a_{i} - a_{j}| is divisible by 168168 if and only if their remainders ri=rjr_{i} = r_{j}.
Choosing kk numbers from the initial set AA, which verify the required conditions, is the same as choosing kk of their remainders (mod 168168) such that:
1. each chosen remainder is not divisible by 66, 77 and 88;
2. all chosen remainders are different.
Suppose we have chosen kk numbers from AA, which verify the conditions. Therefore, all remainders are different and k168k \leq 168 (otherwise, there would be two equal remainders).
Denote by B={0,1,2,3,,167}B = \{0, 1, 2, 3, \ldots, 167\} the set of all possible remainders (mod 168168) and by BmB_{m} the subset of all elements of BB, which are divisible by mm. Compute the number of elements of the following subsets:
B6=168/6=28,B7=168/7=24,B8=168/8=21B6B7=B42=168/42=4,B6B8=B24=168/24=7B7B8=B56=168/56=3,B6B7B8=B168=1 \begin{gathered} |B_{6}| = 168 / 6 = 28, \quad |B_{7}| = 168 / 7 = 24, \quad |B_{8}| = 168 / 8 = 21 \\ |B_{6} \cap B_{7}| = |B_{42}| = 168 / 42 = 4, \quad |B_{6} \cap B_{8}| = |B_{24}| = 168 / 24 = 7 \\ |B_{7} \cap B_{8}| = |B_{56}| = 168 / 56 = 3, \quad |B_{6} \cap B_{7} \cap B_{8}| = |B_{168}| = 1 \end{gathered}
Denote by D=B6B7B8D = B_{6} \cup B_{7} \cup B_{8}, the subset of all elements of BB, which are divisible by at least one of the numbers 66, 77 or 88. By the Inclusion-Exclusion principle we get
D=B6+B7+B8(B6B7+B6B8+B7B8)+B6B7B8=28+24+21(4+7+3)+1=60. \begin{gathered} |D| = |B_{6}| + |B_{7}| + |B_{8}| - (|B_{6} \cap B_{7}| + |B_{6} \cap B_{8}| + |B_{7} \cap B_{8}|) + |B_{6} \cap B_{7} \cap B_{8}| = \\ 28 + 24 + 21 - (4 + 7 + 3) + 1 = 60. \end{gathered}
Each chosen remainder belongs to the subset BDB \setminus D, since it is not divisible by 66, 77 and 88. Hence, kBD=16860=108k \leq |B \setminus D| = 168 - 60 = 108.
Let us show that the greatest possible value is k=108k = 108. Consider n=168n = 168. Given any collection AA of 168168 consecutive positive integers, replace each number with its remainder (mod 168168). Choose from these remainders 108108 numbers, which constitute the set BDB \setminus D. Finally, take 108108 numbers from the initial set AA, having exactly these remainders. These k=108k = 108 numbers verify the required conditions.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.