Problem: Let $x_0$, $x_1$, \dots, $x_{n_0-1}$ be integers,
and let $d_1$, $d_2$, \dots, $d_k$ be positive integers
with $n_0 = d_1 > d_2 > \dotsb > d_k$ and
$\gcd(d_1, d_2, \dots, d_k) = 1$.
For every integer $n \geq n_0$, define
\[ x_n = \left\lfloor \frac{x_{n-d_1} + x_{n-d_2}
  + \dots + x_{n-d_k}}{k} \right\rfloor. \]
Show that the sequence $(x_n)$ is eventually constant.

Solution: Note that if the initial terms are contained
in some interval $[A,B]$ then they will remain in that interval.
Thus the sequence is eventually periodic.
Discard initial terms and let the period be $T$;
we will consider all indices modulo $T$ from now on.

Let $M$ be the maximal term in the sequence
(which makes sense since the sequence is periodic).
Note that if $x_n = M$, we must have
$x_{n-d_i} = M$ for all $i$ as well.
By taking a linear combination $\sum c_i d_i \equiv 1 \pmod T$
(possibly be Bezout's theorem, since $\gcd_i(d_i)=1$),
we conclude $x_{n-1} = M$, as desired.