Elementary way to prove that if $n$ and $10$ are coprime, then $1/n$ has no transient digits.

decimal-expansionelementary-number-theory

With Euler-Fermat's theorem at hand it's easy to prove that if $\gcd(n,10)=1$ then the decimal expansion of $1/n$ is repeating, and that there is no transient (that is, digits after the point before the repetend). With pigeonhole principle we can show easily that $1/n$ is repeating, but I don't know how to prove that there is no transient.

I'd like to show my pupils (that don't know anything about group theory or congruences) that the repeating decimals that have transient are represented by fractions whose denominator has $2$ or $5$ as a factor.

Best Answer

Responding to comments.

To show that $\frac{1}{2^a 5^b}$ has a finite decimal, let $c = \max \{a,b\}$ and consider $$ \frac{1}{2^a 5^b} = \frac{1}{2^a 5^b} \cdot \frac{2^{c-a} 5^{c-b}}{2^{c-a} 5^{c-b}} = \frac{2^{c-a} 5^{c-b}}{10^c} \text{,} $$ which has a finite decimal expansion whose digits are those of $2^{c-a}5^{c-b}$.

Now suppose we have $\frac{1}{2^a 5^b c}$, where $\gcd(c,10) = 1$. Suppose $$ \frac{1}{2^a 5^b c} = \frac{d}{10^e} \text{,} $$ that is, $\frac{1}{2^a 5^b c}$ has a terminating decimal expansion whose digits are the digits of $d$. But then $$ 10^e = 2^a 5^b c d $$ Since the prime factorization of $10^e$ is $2^e 5^e$, the only primes appearing on the right-hand side are $2$ and $5$. Since $\gcd(c,10) = 1$, this forces $c = 1$. As a consequence, if $c \neq 1$, $\frac{1}{2^a 5^b c}$ does not have a terminating decimal expansion.


Warm up: $$ \frac{1}{30} = 0.0\overline{3} \text{,} $$ but also \begin{align*} \frac{1}{30} &= \frac{1}{3} - \frac{3}{10} \\ &= 0.\overline{3} - 0.3 \text{.} \end{align*} So what we need to do is find a way to separate the given fraction into one that contains the part that has a denominator of $2^a 5^b$ and a part that has the maximal denominator relatively prime to $10$.

Suppose we are to understand $a/b$ and $\gcd(b,10) = c$, so $b = c \cdot d$ with $\gcd(d,10) = 1$. We want $$ \frac{a}{b} = \frac{\text{something}}{c} + \frac{\text{another something}}{d} \text{.} $$ The second fraction will tell us about the repetend and the first fraction will tell us about the modification of the leading digits of the repetend to make the transient initial segment. We use the extended Euclidean algorithm to find the unknown numerators.

Let's do another example to see how to find the two numerators. Let's look at $1/175$. We want to find $e$ and $f$ such that $$ \frac{1}{175} = \frac{e}{7} + \frac{f}{25} \text{.} $$ Clearing denominators, $$ 1 = 25e + 7f $$ Using the extended Euclidean algorithm, we find that $\gcd(25,7) = 1$ (which we already know is true, by construction) and also $2 \cdot 25 + (-7) \cdot 7 = 1$. So, $e = 2$ and $f = -7$ work. We find out \begin{align*} \frac{1}{175} &= \frac{2}{7} - \frac{7}{25} \\ &= 0.\overline{285714} - 0.28 \\ &= 0.00\overline{571428} \text{.} \end{align*}

Notice that our construction shows that, in some sense, we should think of the repetend of $1/175$ to be $285714$, with the transient initial segment being altered to suppress the first two digits, rather than thinking of the repetend starting on the third decimal digit.