Repeating Decimal
Fractions & DecimalsA repeating decimal is a decimal in which one or more digits after the decimal point repeat infinitely in a regular pattern.
Definition
A repeating decimal is a decimal where a digit or group of digits keeps repeating forever after the decimal point. We write a bar over the repeating part to show it goes on forever. For example, $0.333\ldots$ is written as $0.3$ with a bar over the $3$.
Example
$1/3 = 0.333\ldots$ (the $3$ repeats). $2/11 = 0.181818\ldots$ ($18$ repeats). We write these with a vinculum (bar) over the repeating digits: $0.\overline{3}$ or $0.\overline{18}$.
Key Insight
Every fraction eventually turns into either a terminating decimal or a repeating decimal when you divide. The division process must eventually repeat because there are only so many possible remainders.
Definition
A repeating decimal has a block of digits (the repetend) that cycles infinitely: $0.d_1d_2\ldots d_k\overline{d_{k+1}\ldots d_{k+p}}$ where $d_{k+1}\ldots d_{k+p}$ repeats. Every repeating decimal represents a rational number, and every rational number has a repeating (or terminating) decimal expansion. To convert: if $x = 0.\overline{abc}$, then $1000x - x = abc$, so $x = abc/999$.
Example
Convert $0.272727\ldots$ to a fraction. Let $x = 0.2727\ldots$. $100x = 27.2727\ldots$. Subtract: $99x = 27$. $x = 27/99 = 3/11$. Verify: $3/11 = 0.272727\ldots$
Key Insight
The length of the repeating block of $1/p$ (for prime $p \neq 2$ or $5$) equals the multiplicative order of $10$ modulo $p$ - a result from number theory. For $1/7$, $\text{ord}_7(10) = 6$, so the repeat length is $6$ digits: $142857$.
Definition
A rational number $p/q$ (in lowest terms) has a purely repeating decimal expansion iff $\gcd(q, 10) = 1$. Otherwise, the expansion has a non-repeating initial part of length $\max(v_2(q), v_5(q))$ followed by a repeating block of length $\text{ord}_{q'}(10)$, where $q' = q/(2^{v_2(q)} \cdot 5^{v_5(q)})$ and $v_p$ denotes $p$-adic valuation.
Example
$1/12$: $q = 12 = 2^2 \times 3$. Non-repeating length $= \max(2,0) = 2$. $q' = 3$. $\text{ord}_3(10) = 1$. So $1/12 = 0.08333\ldots$ with $2$ non-repeating digits and period $1$. Verify: $1/12 = 0.08\overline{3}$.
Key Insight
The theory of repeating decimals is equivalent to the theory of linear recurrences over $\mathbb{Z}/10\mathbb{Z}$. The Berlekamp-Massey algorithm can find the minimal repeating pattern of any sequence, connecting elementary fraction arithmetic to modern sequence analysis and coding theory.