Let
![m](/media/m/1/3/6/1361d4850444c055a8a322281f279b39.png)
be a fixed integer greater than
![1](/media/m/a/9/1/a913f49384c0227c8ea296a725bfc987.png)
. The sequence
![x_0](/media/m/2/8/d/28d8bab97393896fe23acb973f7cb207.png)
,
![x_1](/media/m/9/2/a/92aefd356eeab9982f45f21fb206a2ef.png)
,
![x_2](/media/m/a/a/1/aa16f4edacb7b534405242617406658f.png)
,
![\ldots](/media/m/5/8/5/58542f3cc6046ef3889f8320b7487d60.png)
is defined as follows:
![x_i= 2^i](/media/m/0/e/e/0eed14e6ae04d56d9e60b02a355ac2be.png)
if
![0 \leq i\leq m-1](/media/m/1/2/4/124633d0bc1f4c529a548c4fdbee8487.png)
and
![x_i = \sum_{j=1}^{m}x_{i-j},](/media/m/3/8/7/387bf0b8209d4e54b2bc43aef0f7cd2d.png)
if
![i\geq m](/media/m/4/4/c/44c3b1c2d4d55a1e7f91a9b69c884da1.png)
.
Find the greatest
![k](/media/m/f/1/3/f135be660b73381aa6bec048f0f79afc.png)
for which the sequence contains
![k](/media/m/f/1/3/f135be660b73381aa6bec048f0f79afc.png)
consecutive terms divisible by
![m](/media/m/1/3/6/1361d4850444c055a8a322281f279b39.png)
.
%V0
Let $m$ be a fixed integer greater than $1$. The sequence $x_0$, $x_1$, $x_2$, $\ldots$ is defined as follows:
$x_i= 2^i$ if $0 \leq i\leq m-1$ and $x_i = \sum_{j=1}^{m}x_{i-j},$ if $i\geq m$.
Find the greatest $k$ for which the sequence contains $k$ consecutive terms divisible by $m$.