Question 106
Let $a \geqslant 2$ and $d \geqslant 2$ be two coprime integers. We set $x_{1}=1$; then, for every integer $k \geqslant 1$, we set $x_{k+1}=x_{k} / a$ if $a$ divides $x_{k}$, and $x_{k+1}=x_{k}+d$ otherwise.
Find, as a function of $a$ and $d$, the maximal integer $\ell$ for which $a^{\ell}$ divides one of the terms $x_{1}, x_{2}, x_{3}, \ldots$
Find, as a function of $a$ and $d$, the maximal integer $\ell$ for which $a^{\ell}$ divides one of the terms $x_{1}, x_{2}, x_{3}, \ldots$