An elegant result
Contents
Let $A, M$ be two positive integers such that $A < M$.
Define the sequence $\{c_n\}$ satisfies $0 \le c_n < M$ and $c_n \equiv A n (\mathrm{mod}\ M)$ for $n \ge 1$.
Moreover let $n_1 = 1$ and if $c_{n_k} > 0$, we define
Hence $A n_{k+1}$ is the first positive multiple of $A$ that yields a residual less than $c_{n_k}$.
Following theorem shows the recurrence relation of the sequence $\{n_k\}$.
Theorem 1
Suppose that $c_{n_{k+1}} > 0$, then we have
Following proof is based on the proof of brob26.
Proof: Define $\alpha = \left\lceil \frac{c_{n_k}}{c_{n_{k+1}}} \right\rceil$. Note that
and
Then by the definition of $n_{k+2}$, we know that $n_{k+2} \le \alpha n_{k+1} - n_k$.
Next, we will show that for $1 \le t \le \alpha$, there holds $n_{k+2} - t n_{k+1} + n_k \ge 0$.
For $t = 1$, $n_{k+2} - n_{k+1} + n_k \ge 0$ holds apparently. Furthermore, assume that for $1 \le t < \alpha$ we have $n_{k+2} - t n_{k+1} + n_k \ge 0$.
Now observe that
Since $t c_{n_{k+1}} \ge c_{n_{k+1}} > c_{n_{k+2}}$, we have $c_{n_{k+2}} - t c_{n_{k+1}} + c_{n_k} < c_{n_k}$.
And, we also have
Thus $n_{k+2} - t n_{k+1} + n_k > 0$. Then by the definition of $n_{k+1}$, we must have $n_{k+1} \le n_{k+2} - t n_{k+1} + n_k$, i.e., $n_{k+2} - (t+1) n_{k+1} + n_k \ge 0$.
Consequently, $n_{k+2} - \alpha n_{k+1} + n_k \ge 0$, or equivalently $n_{k+2} \ge \alpha n_{k+1} - n_k$.
As a conclusion, there holds $n_{k+2} = \alpha n_{k+1} - n_k$.
☐
LastMod Feb 12, 2020
Email smsxgz at gmail dot com