Maths Olympiad Prep

Library / /473 of 520

Number theory Difficulty 7.3 National olympiad, round 2 Prove it

Determine all integers n2n \geqslant 2 with the following property: for any integers a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} whose sum is not divisible by nn, there exists an index 1in1 \leqslant i \leqslant n such that none of the numbers
ai,ai+ai+1,,ai+ai+1++ai+n1 a_{i}, a_{i}+a_{i+1}, \ldots, a_{i}+a_{i+1}+\cdots+a_{i+n-1}
is divisible by nn. (We let ai=aina_{i}=a_{i-n} when i>ni>n.) (Thailand) Answer: These integers are exactly the prime numbers.

Solution

Let us first show that, if n=abn=a b, with a,b2a, b \geqslant 2 integers, then the property in the statement of the problem does not hold. Indeed, in this case, let ak=aa_{k}=a for 1kn11 \leqslant k \leqslant n-1 and an=0a_{n}=0. The sum a1+a2++an=a(n1)a_{1}+a_{2}+\cdots+a_{n}=a \cdot(n-1) is not divisible by nn. Let ii with 1in1 \leqslant i \leqslant n be an arbitrary index. Taking j=bj=b if 1inb1 \leqslant i \leqslant n-b, and j=b+1j=b+1 if nb<inn-b<i \leqslant n, we have
ai+ai+1++ai+j1=ab=n0(modn) a_{i}+a_{i+1}+\cdots+a_{i+j-1}=a \cdot b=n \equiv 0 \quad(\bmod n)
It follows that the given example is indeed a counterexample to the property of the statement. Now let nn be a prime number. Suppose by contradiction that the property in the statement of the problem does not hold. Then there are integers a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} whose sum is not divisible by nn such that for each i,1ini, 1 \leqslant i \leqslant n, there is j,1jnj, 1 \leqslant j \leqslant n, for which the number ai+ai+1++ai+j1a_{i}+a_{i+1}+\cdots+a_{i+j-1} is divisible by nn. Notice that, in any such case, we should have 1jn11 \leqslant j \leqslant n-1, since a1+a2++ana_{1}+a_{2}+\cdots+a_{n} is not divisible by nn. So we may construct recursively a finite sequence of integers 0=i0<i1<i2<<in0=i_{0}<i_{1}<i_{2}<\cdots<i_{n} with is+1isn1i_{s+1}-i_{s} \leqslant n-1 for 0sn10 \leqslant s \leqslant n-1 such that, for 0sn10 \leqslant s \leqslant n-1,
ais+1+ais+2++ais+10(modn) a_{i_{s}+1}+a_{i_{s}+2}+\cdots+a_{i_{s+1}} \equiv 0 \quad(\bmod n)
(where we take indices modulo nn ). Indeed, for 0s<n0 \leqslant s<n, we apply the previous observation to i=is+1i=i_{s}+1 in order to define is+1=is+ji_{s+1}=i_{s}+j. In the sequence of n+1n+1 indices i0,i1,i2,,ini_{0}, i_{1}, i_{2}, \ldots, i_{n}, by the pigeonhole principle, we have two distinct elements which are congruent modulo nn. So there are indices r,sr, s with 0r<sn0 \leqslant r<s \leqslant n such that isir(modn)i_{s} \equiv i_{r}(\bmod n) and
air+1+air+2++ais=j=rs1(aij+1+aij+2++aij+1)0(modn) a_{i_{r}+1}+a_{i_{r}+2}+\cdots+a_{i_{s}}=\sum_{j=r}^{s-1}\left(a_{i_{j}+1}+a_{i_{j}+2}+\cdots+a_{i_{j+1}}\right) \equiv 0 \quad(\bmod n)
Since isir(modn)i_{s} \equiv i_{r}(\bmod n), we have isir=kni_{s}-i_{r}=k \cdot n for some positive integer kk, and, since ij+1ijn1i_{j+1}-i_{j} \leqslant n-1 for 0jn10 \leqslant j \leqslant n-1, we have isir(n1)ni_{s}-i_{r} \leqslant(n-1) \cdot n, so kn1k \leqslant n-1. But in this case
air+1+air+2++ais=k(a1+a2++an) a_{i_{r}+1}+a_{i_{r}+2}+\cdots+a_{i_{s}}=k \cdot\left(a_{1}+a_{2}+\cdots+a_{n}\right)
cannot be a multiple of nn, since nn is prime and neither kk nor a1+a2++ana_{1}+a_{2}+\cdots+a_{n} is a multiple of nn. 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.