Maths Olympiad Prep

Library / USAMO /64 of 156

USAMO

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 0≤ak≤k−10 \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 k≥1k \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+1k≤sk+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+1≤skk, \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+1−sk=(k+1)skk−sk=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 k≥1k \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 ak≤k−1a_k \le k - 1, for k≥2k \ge 2, we have
sk=a1+a2+a3+⋯+ak≤n+1+2+⋯+(k−1)=n+k(k−1)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 n≤m(m+1)2n \le \frac{m(m+1)}{2} (such an integer clearly exists). Then
qm=smm≤nm+m−12≤m+12+m−12=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 i≥1i \ge 1, satisfies the range condition
0≤am+i=qm≤m≤m+i−1, 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 k≥1k \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(m−1)s_m = m(m-1). To this end, consider the sequence which computes the differences between sks_k and k(k−1)k(k-1), i.e., whose kk-th term is sk−k(k−1)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
(sk−k(k−1))−(sk+1−(k+1)k)=2k−ak+1≥2k−k=k≥1. (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(k−1)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 sk≥k2s_k \ge k^2 and sk+1≤(k+1)(k−1)=k2−1s_{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(m−1)s_m = m(m-1). We claim that
m−1=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=m−1a_{m+i} = m-1, for i≥1i \ge 1, satisfies the range condition
0≤am+i=m−1≤m+i−1, 0 \le a_{m+i} = m-1 \le m+i-1,
and yields
sm+i=sm+i(m−1)=m(m−1)+i(m−1)=(m+i)(m−1). 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,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

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