Maths Olympiad Prep

Library / /122 of 299

Number theory Difficulty 6.3 National Olympiad Prove it Iran

Let nn be a natural number. Determine the smallest natural number kk such that among any kk natural numbers, it is always possible to select an even number of them having a sum divisible by nn.

Solution

We start with a lemma.

Lemma 1. Let a1,a2,,ana_1, a_2, \dots, a_n be nn even integers. Then there is a subsequence i1<i2<<iki_1 < i_2 < \dots < i_k of 1,2,,n1, 2, \dots, n such that ai1++aika_{i_1} + \dots + a_{i_k} is divisible by 2n2n.

Proof. Consider the following integers
Si=12(a1+a2++ai)1in S_i = \frac{1}{2}(a_1 + a_2 + \dots + a_i) \quad 1 \le i \le n
If there is some ii such that nSin \mid S_i, we are done. So we assume that nn divides none of the SiS_i's and since there are nn numbers there exist i<ji < j such that SiSj(modn)S_i \equiv S_j \pmod n. This implies
n12(ai+1++aj)2nai+1++aj n \mid \frac{1}{2}(a_{i+1} + \dots + a_j) \Rightarrow 2n \mid a_{i+1} + \dots + a_j
and the proof is complete. \square

Now for the main problem, we have two cases.

* nn is an odd number. The answer is k=2nk = 2n. Firstly, note that for k<2nk < 2n if we set a1=a2==ak=1a_1 = a_2 = \dots = a_k = 1, we cannot choose an even number of aia_i's with sum divisible by nn. On the other hand, if a1,a2,,a2na_1, a_2, \dots, a_{2n} are 2n2n integers, then we define Si=a1++a2iS_i = a_1 + \dots + a_{2i} for i=1,2,,ni = 1, 2, \dots, n. By arguments same as the proof of the lemma, there is some ii such that nSin \mid S_i or there exists i<ji < j such that nSjSin \mid S_j - S_i. In both cases we have found an even number of aia_i's having sum divisible by nn.

* n=2mn = 2m is an even number. We claim that k=n+1=2m+1k = n + 1 = 2m + 1 is the answer. Note that for k2mk \le 2m, if we set a1=a2==ak1=1a_1 = a_2 = \dots = a_{k-1} = 1 and ak=0a_k = 0, it is not possible to select an even number of aia_i's having a sum divisible by 2m2m. On the other hand, suppose that a1,a2,,a2m+1a_1, a_2, \dots, a_{2m+1} are 2m+12m+1 arbitrary integers. Assume that b1,b2,,bsb_1, b_2, \dots, b_s are the even numbers among aia_i's and c1,c2,,crc_1, c_2, \dots, c_r are the odd numbers. Since r+s=2m+1r+s = 2m+1, exactly one of rr or ss is odd and the other is even. We suppose that rr is odd and ss is even (the other case is similar). Now look at the mm numbers a1+a2,a3+a4,,ar2+ar1,b1+b2,,bs1+bsa_1+a_2, a_3+a_4, \dots, a_{r-2}+a_{r-1}, b_1+b_2, \dots, b_{s-1}+b_s. Note that all these sums are even, so referring to the lemma, we can select some of them with sum divisible by 2m=n2m = n. Since each of these numbers is sum of two members of aia_i's we have found an even number of aia_i's having a sum divisible by nn, as desired.

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.