Open kwkim00 opened 2 years ago
$$ r_{i+1} $$
$$r_{i+1}$$
It's strange T.T
Let us start from division process for a positive rational number. For two positive integers $p$ and $q$,
$$ \begin{align} \frac{p}{q} &= \frac{b_0 q + r_1}{q} \ &= b_0 + \frac{r_1}{q} \ &= b_0 + \frac{1}{10}\frac{10 r_1}{q} \ &= b_0 + \frac{1}{10}\frac{b_1 q + r_2}{q} \ &= b_0 + \frac{b_1}{10} + \frac{1}{10}\frac{r_2}{q} \ &= b_0.b_1 + \frac{1}{10}\frac{r_2}{q} \ &= b_0.b_1 + \frac{1}{100}\frac{10 r_2}{q} \ &= b_0.b_1 + \frac{1}{100}\frac{b_2 q + r_3}{q} \ &= b_0.b_1 + \frac{b_2}{100} + \frac{1}{100}\frac{r_3}{q} \ &= b_0.b_1b_2 + \frac{1}{100}\frac{r_3}{q} \ & \cdots \ \end{align} $$
This way, after subtracting the integer part $b_0$ out, we can summarize the division process by following recurrence relation
$$ \begin{align} \forall_{i \geq 1} 10 r_i = bi q + r{i+1} , 0\leq r_i \lt q \ \end{align} $$
, which is well defined due to the uniqueness of integer division.
Since there are a finite number of remainders of $q$, there exist $i$ $\lt$ $j$ such that
$$ r_i = r_j \ $$
then
$$ b_i = bj \text{ and } r{i+1} = r_{j+1}\ $$
due to well-defined property of the recurrence relation. Now denoting $j = i+t$ and by mathematical induction, we can conclude that
$$ \forall_{k \geq i} rk = r{k+t}\ $$
and it implies
$$ \forall_{k \geq i} bk = b{k+t} $$
which means the decimal expansion is ultimately periodic.
I fixed 1 -> j because in general periodicity can start after several decimal places
Further simplified the proof.
Thank you @Kwangwoo-master for the write-up and step-by-step justifications. I learned a lot from your proof. :+1: