Maths Olympiad Prep

Library / /71 of 169

Algebra Difficulty 7.3 National Olympiad, round 2 Prove it United States

Let nn be a positive integer. Define a sequence by setting a1=na_1 = n and, for each k>1k > 1, letting aka_k be the unique integer in the range 0akk10 \le a_k \le k - 1 for which a1+a2++aka_1 + a_2 + \cdots + a_k is divisible by kk. For instance, when n=9n = 9 the obtained sequence is 9,1,2,0,3,3,3,9, 1, 2, 0, 3, 3, 3, \dots. Prove that for any nn the sequence a1,a2,a3,a_1, a_2, a_3, \dots eventually becomes constant.

Solutions — 3

Solution 1

For k1k \ge 1, let
sk=a1+a2++ak. s_k = a_1 + a_2 + \cdots + a_k.
We have
sk+1k+1<sk+1k=sk+ak+1ksk+kk=skk+1. \frac{s_{k+1}}{k+1} < \frac{s_{k+1}}{k} = \frac{s_k + a_{k+1}}{k} \le \frac{s_k + k}{k} = \frac{s_k}{k} + 1.
On the other hand, for each kk, sk/ks_k/k is a positive integer. Therefore
sk+1k+1skk, \frac{s_{k+1}}{k+1} \le \frac{s_k}{k},
and the sequence of quotients sk/ks_k/k is eventually constant. If sk+1/(k+1)=sk/ks_{k+1}/(k+1) = s_k/k, then
ak+1=sk+1sk=(k+1)skksk=skk, a_{k+1} = s_{k+1} - s_k = \frac{(k+1)s_k}{k} - s_k = \frac{s_k}{k},
showing that the sequence aka_k is eventually constant as well.

Solution 2

For k1k \ge 1, let
sk=a1+a2++akandskk=qk. s_k = a_1 + a_2 + \cdots + a_k \quad \text{and} \quad \frac{s_k}{k} = q_k.
Since akk1a_k \le k - 1, for k2k \ge 2, we have
sk=a1+a2+a3++akn+1+2++(k1)=n+k(k1)2. s_k = a_1 + a_2 + a_3 + \cdots + a_k \le n + 1 + 2 + \cdots + (k-1) = n + \frac{k(k-1)}{2}.
Let mm be a positive integer such that nm(m+1)2n \le \frac{m(m+1)}{2} (such an integer clearly exists). Then
qm=smmnm+m12m+12+m12=m. q_m = \frac{s_m}{m} \le \frac{n}{m} + \frac{m-1}{2} \le \frac{m+1}{2} + \frac{m-1}{2} = m.
We claim that
qm=am+1=am+2=am+3=am+4= q_m = a_{m+1} = a_{m+2} = a_{m+3} = a_{m+4} = \dots
This follows from the fact that the sequence a1,a2,a3,a_1, a_2, a_3, \dots is uniquely determined and choosing am+i=qma_{m+i} = q_m, for i1i \ge 1, satisfies the range condition
0am+i=qmmm+i1, 0 \le a_{m+i} = q_m \le m \le m+i-1,
and yields
sm+i=sm+iqm=mqm+iqm=(m+i)qm. s_{m+i} = s_m + iq_m = mq_m + iq_m = (m+i)q_m.

Solution 3

For k1k \ge 1, let
sk=a1+a2++ak. s_k = a_1 + a_2 + \cdots + a_k.
We claim that for some mm we have sm=m(m1)s_m = m(m-1). To this end, consider the sequence which computes the differences between sks_k and k(k1)k(k-1), i.e., whose kk-th term is skk(k1)s_k - k(k-1). Note that the first term of this sequence is positive (it is equal to nn) and that its terms are strictly decreasing since
(skk(k1))(sk+1(k+1)k)=2kak+12kk=k1. (s_k - k(k-1)) - (s_{k+1} - (k+1)k) = 2k - a_{k+1} \ge 2k - k = k \ge 1.
Further, a negative term cannot immediately follow a positive term. Suppose otherwise, namely that sk>k(k1)s_k > k(k-1) and sk+1<(k+1)ks_{k+1} < (k+1)k. Since sks_k and sk+1s_{k+1} are divisible by kk and k+1k+1, respectively, we can tighten the above inequalities to skk2s_k \ge k^2 and sk+1(k+1)(k1)=k21s_{k+1} \le (k+1)(k-1) = k^2 - 1. But this would imply that sk>sk+1s_k > s_{k+1}, a contradiction. We conclude that the sequence of differences must eventually include a term equal to zero.
Let mm be a positive integer such that sm=m(m1)s_m = m(m-1). We claim that
m1=am+1=am+2=am+3=am+4= m - 1 = a_{m+1} = a_{m+2} = a_{m+3} = a_{m+4} = \dots
This follows from the fact that the sequence a1,a2,a3,a_1, a_2, a_3, \dots is uniquely determined and choosing am+i=m1a_{m+i} = m-1, for i1i \ge 1, satisfies the range condition
0am+i=m1m+i1, 0 \le a_{m+i} = m-1 \le m+i-1,
and yields
sm+i=sm+i(m1)=m(m1)+i(m1)=(m+i)(m1). s_{m+i} = s_m + i(m-1) = m(m-1) + i(m-1) = (m+i)(m-1).

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.