Maths Olympiad Prep

Track / Stage 5 / 155 of 400 #755 of 1964

Problem 755

AIME late
Number theory Difficulty 5.4 Find the answer

1. Let mm be a fixed integer greater than 1, and the sequence x0,x1x_{0}, x_{1}, x2,x_{2}, \cdots is defined as follows:
xi={2i,01m1,j=1mxij,im. x_{i}=\left\{\begin{array}{ll} 2^{i}, & 0 \leqslant 1 \leqslant m-1, \\ \sum_{j=1}^{m} x_{i-j}, & i \geqslant m . \end{array}\right.

Find the maximum value of kk such that there are kk consecutive terms in the sequence that are divisible by mm.
(Poland provided)

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Official solution

Solution: Let rir_{i} be the remainder of xix_{i} modulo mm. In the sequence, divide the terms into blocks of mm consecutive terms. Then, there are at most mmm^{m} different cases for the remainders. By the pigeonhole principle, one type of case will appear repeatedly. Since the defined recurrence relation can be used to deduce both forward and backward, the sequence {ri}\left\{r_{i}\right\} is a periodic sequence.
From the given conditions, the backward recurrence formula is
xi=xi+mj=1m1xi+j x_{i}=x_{i+m}-\sum_{j=1}^{m-1} x_{i+j} \text {. }

The remainders of the mm terms are r0=1,r1=2r_{0}=1, r_{1}=2, ,rm1=2m1\cdots, r_{m-1}=2^{m-1}. To find the remainders modulo mm of the mm terms preceding these, using the backward recurrence formula, the remainders of the preceding mm terms modulo mm are 0,0,,0,1m1\underbrace{0,0, \cdots, 0,1}_{m-1}. Combining the periodicity of the remainder sequence, we get km1k \geqslant m-1.

On the other hand, if there are mm consecutive terms in the remainder sequence {ri}\left\{r_{i}\right\} that are all 0, then by the backward and forward recurrence formulas, for all i0i \geqslant 0, we have ri=0r_{i}=0, which is a contradiction.
Therefore, the maximum value of kk is m1m-1.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.