Maths Olympiad Prep

Track / Stage 6 / 162 of 400 #1802 of 2604

Problem 1802

National Olympiad, first round
Number theory Difficulty 6.2 Prove it MEMO Mathematical Olympiad · Middle European Mathematical Olympiad (MEMO)

Determine the smallest positive integer nn for which the following statement holds true: From any nn consecutive integers one can select a non-empty set of consecutive integers such that their sum is divisible by 20192019.

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:

Answer. n=340n=340.

The prime factorization of 20192019 is 3⋅6733 \cdot 673. Let p=673p=673.

For each integer kk, color the three numbers kp−1k p-1, kpk p, kp+1k p+1 red, and the six numbers kp+p−52k p+\frac{p-5}{2}, kp+p−32k p+\frac{p-3}{2}, kp+p−12k p+\frac{p-1}{2}, kp+p+12k p+\frac{p+1}{2}, kp+p+32k p+\frac{p+3}{2}, kp+p+52k p+\frac{p+5}{2} blue. Now the integers are colored periodically. In a period of length p=673p=673, there are 33 red integers, then 332332 uncolored integers, then 66 blue integers and finally 332332 uncolored integers.

The sum of the integers in a red interval is 3kp=2019⋅k3 k p = 2019 \cdot k, and the sum of the integers in a blue interval is 6(kp+p2)=2019⋅(2k+1)6\left(k p+\frac{p}{2}\right)=2019 \cdot (2 k+1). So if there is a colored interval (we mean a maximal one throughout) in the given nn consecutive integers, one can choose it. It is easy to see, that among any 340=332+(6−1)+(3−1)+1340=332+(6-1)+(3-1)+1 consecutive integers, there must be a colored interval. Thus the smallest nn (that we look for) satisfies n≤340n \leq 340.

Now we will show that it is not possible to choose consecutive integers in the desired way from the set A={335,336,…,673}A=\{335,336, \ldots, 673\} (∣A∣=339|A|=339 and thus n≥340n \geq 340). Assume that there exists {a,a+1,…,b}⊆A\{a, a+1, \ldots, b\} \subseteq A such that
2019∣a+(a+1)+⋯+b=(b−a+1)(a+b)2 2019 \mid a+(a+1)+\cdots+b=\frac{(b-a+1)(a+b)}{2}
That means either 673∣b−a+1673 \mid b-a+1, or 673∣a+b673 \mid a+b. Since
0<1≤b−a+1≤339<673 0<1 \leq b-a+1 \leq 339<673
673673 must divide a+ba+b. Taking into account that
671=335+336≤a+b≤673+673=2⋅673 671=335+336 \leq a+b \leq 673+673=2 \cdot 673
we conclude that a+ba+b must be 673673 or 2⋅6732 \cdot 673. It means either a=335a=335 and b=338b=338, or a=336a=336 and b=337b=337, or a=b=673a=b=673. But 2019∤335+336+337+338=13462019 \nmid 335+336+337+338=1346, 2019∤336+337=6732019 \nmid 336+337=673 and 2019∤6732019 \nmid 673, a contradiction.

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