Maths Olympiad Prep

Library / /24 of 45

, 2008

Number theory Difficulty 5.7 AIME, harder Prove it Slovenia

Given a sequence of integers a1,a2,a3,a_1, a_2, a_3, \dots such that
0akk1anda1++ak0(modk) 0 \le a_k \le k-1 \quad \text{and} \quad a_1 + \dots + a_k \equiv 0 \pmod{k}
for all k>1k > 1. Prove that the sequence is constant from some point on. For example, when a1=9a_1 = 9 the sequence is 9,1,2,0,3,3,3,9, 1, 2, 0, 3, 3, 3, \dots.

Solution

Taking a look at the sequences we obtain for different values of a1a_1, we notice the following: Assume there is an index kk such that a1+a2++ak=dka_1 + a_2 + \dots + a_k = d \cdot k and 0d<k0 \le d < k. Then a1+a2++ak+d=d(k+1)a_1 + a_2 + \dots + a_k + d = d \cdot (k+1) and since ak+1a_{k+1} is a uniquely determined number between 00 and kk such that a1+a2++ak+1a_1 + a_2 + \dots + a_{k+1} is divisible by k+1k+1, we have ak+1=da_{k+1} = d. We come to the same conclusion about all subsequent terms of the sequence, so this sequence is constant and equal to dd from ak+1a_{k+1} onward.

Let us show that for all choices of a1a_1 there exists an index kk such that a1+a2++ak=dka_1 + a_2 + \dots + a_k = d \cdot k and 0d<k0 \le d < k. Assume, to the contrary, that this is not the case. If a1<0a_1 < 0 and the sequence is not constantly 00 from some point onward, there are infinitely many positive terms, so there exists an index kk such that a1+a2++ak0a_1 + a_2 + \dots + a_k \ge 0. If by chance we have a1>0a_1 > 0, then this is true for all kk. So, for kk sufficiently large we have a1+a2++ak=dkka_1 + a_2 + \dots + a_k = d_k \cdot k, dk0d_k \ge 0, and by hypothesis a1+a2++akk2a_1 + a_2 + \dots + a_k \ge k^2. We can bound the terms by a21a_2 \le 1, a32a_3 \le 2 and aii1a_i \le i-1 for all i>1i > 1. So (for kk sufficiently large) we have
k2a1+a2++aka1+1+2++(k1)=a1+k(k1)2, k^2 \le a_1 + a_2 + \dots + a_k \le a_1 + 1 + 2 + \dots + (k-1) = a_1 + \frac{k(k-1)}{2},
which means that for all kk from some point onward we have
a1k(k+1)2. a_1 \ge \frac{k(k+1)}{2}.
Evidently, this last inequality is not always satisfied, for example when k2a1k \ge 2|a_1|. We have arrived at a contradiction which implies that the initial assumption was incorrect.

Hence, we have shown there exists an index k+1k + 1 such that from k+1k + 1 onward all terms of the sequence are equal.

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 and solution reproduced as published; topic and difficulty added by this site.