
Remember math class from your early teens, when you learned about fractions and decimal points?
Like, the fraction \(\frac{1}{4}\) and the decimal representation \(.25\) are exact representations of the same number.
But some fractions, like \(\frac{1}{3}\), require infinite repeating digits after the decimal point; in this case, \(.33333...\) with the threes repeating forever, or \(.\overline{3}\) in a compact notation (the bar or “overline” above the three says that part repeats forever). Those are exact ways of representing the same number as well, but the overline repesents a form of the infinite.
A tamed infinity.
Infinitely many digits, represented through a finite number of symbols.
Infinity pulsing under an overline.
We also learned how to convert decimals into fractions. If you have an exact and finite decimal representation, like the aforementioned \(.25\), you look at the digits after the decimal and divide by a one with that many zeroes (AKA a power of 10) – e.g. \(.25 = \frac{25}{100}\).
What if I told you there was an equally easy trick for a repeating decimal?
\(.\overline{12345} = \frac{12345}{99999}\), and yes, the general rule is exactly what you think. Nines are the key to repeating decimals in the same way powers of ten are the key to non-repeating decimals.

Maybe you didn’t expect to stumble into a post about making elementary school math more complicated on a blog about whisky and weird fiction.
Maybe this was a very unwelcome development.
Let me back up a little.
One of my less popular beliefs is that our education system makes a lot of people think they hate math, when they really just hate the way it was taught.
In primary and secondary school, a lot of math is taught by (and warped by regulation from) people for whom math is a pragmatic duty, not a matter of joy. (And in college, a lot of math is taught by people who do love math but would rather be in their office figuring out new things, not teaching.) School math focuses on drilling, memorization, and portrays that there’s one right way to do things. I can understand why some read that as a hostile ideology.
But if you talk to somebody who loves math, it’s a big box of toys they keep bringing out and rearranging to explore new aspects of seemingly familiar things; a playground with many possible ways to get to any destination.
For example, in Surely You’re Joking, Mr. Feynman! (a book that was informally required reading in my college), Feynman mentions a conversation with his vast-foreheaded friend Hans Bethe, who says something like “Don’t you know how to take the square of numbers near fifty?” And he proceeds to lay out a rule that makes it easy to do it in your head. (I will explain and prove said rule in the appendix.)

To state the obvious, both these guys knew how to multiply two digit numbers together. They were probably pretty good at it. But they lived in the joy of math, where a new shortcut is fun, not a load weighing you down on the way to the next test.
Anyway, this blog post is going to explore something I figured out on my own years back on an airport napkin between flights. It is, technically, a discovery, in that nobody taught it to me, but it’s pretty basic, and I just found it explained thoroughly in Wikipedia. I’m not getting an award for this. But as a result of it being both basic and also something I don’t remember ever being taught, I think it might be the perfect way to lay out something that a math-lover would recognize as a fun curiosity, and that might, maybe, give some math-haters an emotional insight into why math is sometimes fun for some of us.
That’s the premise. Come with me or throw your computer into the Grand Canyon. Or your phone – I guess some people read blogs on phones.
None of the math here is more advanced than long division, until the appendices, where there’s algebra and very light calculus, and those parts are even more optional than the rest.

Anyway, I was going to show that a repeating decimal whose repeating component is W digits long is equal to that repeating component divided by W nines. We’ll start with single digit repeating components.
If \(\frac{1}{3} = .\overline{3}\) (and it does), then we should be able to divide both sides by three:
\[ \begin{aligned} & \frac{1}{3} &= & .\overline{3} \\ & \frac{1}{3} \div 3 &= & .\overline{3} \div 3 \\ & \frac{1}{9} &= & .\overline{1} \end{aligned} \]
You could figure that out with long division too. Wait, you might be thinking. Can you do that? Divide… through the overline? Yep. There will be a proof in the appendix, but it will use some calculus.
You can multiply through the overline, too, and that’s useful, because if you multiply any one digit number with \(.\overline{1}\), you’re going to get that digit, repeating.
\[ \begin{aligned} \frac{0}{9} &= 0 \times \frac{1}{9} &= .\overline{0} &= 0 \\ \frac{1}{9} &= 1 \times \frac{1}{9} &= .\overline{1} \\ \frac{2}{9} &= 2 \times \frac{1}{9} &= .\overline{2} \\ \frac{3}{9} &= 3 \times \frac{1}{9} &= .\overline{3} \\ \frac{4}{9} &= 4 \times \frac{1}{9} &= .\overline{4} \\ \frac{5}{9} &= 5 \times \frac{1}{9} &= .\overline{5} \\ \frac{6}{9} &= 6 \times \frac{1}{9} &= .\overline{6} \\ \frac{7}{9} &= 7 \times \frac{1}{9} &= .\overline{7} \\ \frac{8}{9} &= 8 \times \frac{1}{9} &= .\overline{8} \\ \frac{9}{9} &= 9 \times \frac{1}{9} &= .\overline{9} &= 1 \end{aligned} \]
I mean, it’s not that impressive. There’s only 10 of them, and the ones we didn’t already know wouldn’t have been hard to find with long division.
But so far, the pattern holds: single digit divided by single nine is equal to that digit repeating forever after a decimal point.
And… wait, did that last line claim that \(.\overline{9}\) and \(1\) were the same number?

Another thing junior high math teachers kept from me: there are two equally valid ways to write the number one.
In fact, all integers, except for 0, have two representations; e.g. \(1337 = 1336.\overline{9}\). So do all non-repeating decimals; e.g. \(-420.69 = -420.68\overline{9}\).
I have seen people freak out about this. “No no no,” they say, weeping, clawing at their faces. “Maybe \(.\overline{9}\) is almost 1, but it’s not exactly equal to 1.”
OK, how close is it to 1? If they’re almost equal, but not equal, but so close it would be impossible to be any closer… you’ve created an even harder thing to accept.
The way that our number system is defined, they are equal. Not almost equal. There will be a proof in the appendix.
\(.\overline{9} = .999999999...\) by definition.
But if you think about it, \(.\overline{9} = .\overline{99} = .\overline{999}...\)… repeating \(9\) forever is indistinguishable from repeating \(99\) forever is indistinguishable from repeating \(999\) forever, etc. Just deck chair rearrangement.
So:
\[ \begin{aligned} \frac{1}{9} &= 1 \div 9 &= .\overline{9} \div 9 &= .\overline{1} \\ \frac{1}{99} &= 1 \div 99 &= .\overline{99} \div 99 &= .\overline{01} \\ \frac{1}{999} &= 1 \div 999 &= .\overline{999} \div 999 &= .\overline{001} \end{aligned} \]
… and so forth. \(1\) over \(N\) nines is a repeating decimal of \(N-1\) zeroes and a \(1\).
As we did with our single one repeating decimal, we can multiply through by any number of that many digits or fewer, and get that number, repeating, in our chosen field width.
\[ \begin{aligned} \frac{45}{99} &= 45 \times .\overline{01} &= .\overline{45} \\ \frac{1337}{999999} &= 1337 \times .\overline{000001} &= .\overline{001337} \end{aligned} \]
Quod erat demonstrandum. You can convert any repeating decimal to a fraction by dividing the repeating element by as many nines as the width of the repeating element.

You can “reduce” a fraction by dividing the top and bottom by the same number, if they both divide evenly.
\[ \begin{aligned} 0.\overline{45} &= \frac{45}{99} \\ &= \frac{5 \times 9}{11 \times 9} \\ &= \frac{5}{11} \end{aligned} \]
\(99 = 3^2 \times 11\), so you’ll find denominators of \(11\), \(33\), and \(99\) for two-digit repeating decimals.
\(999 = 3^3 \times 37\), so you’ll find denominators of \(27\), \(37\), \(111\), and \(999\) for three-digit repeating decimals.
Every number that’s all-nines is divisible by \(9 = 3^2\) and the same number of ones (\(999..99 = 9 \times 111..11\)), so take the prime factorization of that many ones, and use the Fundamental Theorem of Arithmetic, which states that every number has a unique prime factorization, take all the combinations of the prime factors, and you have all the denominators that can create a repeating decimal of that width. But note that any denominators that were already used for a previous all-nines number can be expressed in a smaller width – e.g. \[ 0.\overline{4545} = \frac{4545}{9999} = \frac{505}{1111} = \frac{5}{11} = \frac{45}{99} = 0.\overline{45}\]
Fun fact, har har, for the same reason you can divide \(1 = 0.\overline{9}\) by any number of nines and get a repeating 1 preceded by zeroes, you can also divide \(1\) by any number of ones and get a repeating 9 preceded by zeroes.
\[ \begin{aligned} \frac{1}{1} &= 0.\overline{9} \\ \frac{1}{11} &= 0.\overline{09} \\ \frac{1}{111} &= 0.\overline{009} \\ \frac{1}{1111} &= 0.\overline{0009} \end{aligned} \]
Very cool, very pretty, but, OK, so there are some kinds of repeating decimals this doesn’t work for – anything whose integer part is not zero, and/or if the repeating field doesn’t start immediately after the decimal point: \(2.\overline{52}\), \(0.000\overline{3}\), \(24.56\overline{19}\), etc.
Let’s call repeating decimals that start with an integer part of 0 and where the repeating part starts immediately after the decimal points “pretty,” and the other kind “ugly.”
Every ugly repeating decimal can be decomposed into a non-repeating decimal added to a power of ten times pretty repeating decimal. Multiplying by a power of ten lets you slide the decimal point left or right.
And then, if you insist, you can convert that into a proper fraction.
\[ \begin{aligned} 2.\overline{52} &= 10^1 \times 0.\overline{25} \\ &= 10 \times \frac{25}{99} \\ &= \frac{250}{99} \\ \\ 24.56\overline{19} &= 24.56 + 10^{-2} \times 0.\overline{19} \\ &= \frac{2456}{100} + \frac{19}{9900} \\ &= \frac{19 \times 100 + 2456 \times 9900}{ 100 \times 9900} \\ &= \frac{24,316,300}{990,000} \end{aligned} \]
… ugly but doable, and maybe not in your head anymore.

I could imagine ways it might be useful, but mostly it’s just fun.
Maybe I haven’t converted you, but can you imagine how somebody else might think it was fun? I would count that as a victory.
If, on the other hand, you read that and thought never has so much math notation been used to prove something so obvious, while nonetheless playing fast and loose with the operations, then these appendices are for you.
It’s easiest for numbers from \(46\) to \(54\), so you don’t have to deal with any carries. And yes, it relies on some memorized facts, but just addition and subtraction of numbers with a small number of significant figures, and multiplication tables for single digit integers.
Why does it work? One more very reusable toolbox trick, the FOIL method for multiplying two binomials: sum together the first, outside, inside, and last pairs of terms.
\[ \begin{aligned} (50+n)^2 &= (50 + n) \times (50 \times n) \\ &= 50{\times}50 + 50{\times}n + 50{\times}n + n{\times}n \\ &= 2500 + 100{\times}n + n^2 \end{aligned} \]
The trick works because \(F\) is easy to remember, \(O+I\) is round and easy to add or subtract from \(F\), and \(L\) is small enough to be ignored. Come up with your own FOIL trick.
Content warning: basic calculus.
Let’s consider a pretty repeating decimal, as defined above:
\(r(x,w) = 0.\overline{x}\)
… where \(x\) is a natural number of one or more digits, and let \(w\) be the number of digits, or width of \(x\).
By definition, \(0.\overline{x}\) means \(x\) slid \(w\) digits to the right, added to \(x\) slid \(2 \times w\) digits to the right, added to \(x\) slid \(3 \times w\) digits to the right, and so on till infinitely. And in decimal notation, “slid \(n\) digits to the right” means “multiplied by 10 to the negative \(n\) power.”
For example:
\[ \begin{aligned} 0.\overline{420} & = 420 \times 10^{-3} & = 0&.420 \\ & + 420 \times 10^{-6} & + 0&.000420 \\ & + 420 \times 10^{-9} & + 0&.000000420 \\ & ... \end{aligned} \]
Which can be expressed as
\[ r(x,w) = \sum_{i=1}^{\infty} 10^{-iw}x \]
… which is almost, but not quite, similar to the infinite geometric series, which states that
\[ \sum_{i=0}^{\infty} az^i = \frac{a}{1-z} \]
… the main difference being their sum starts at \(i=0\) and ours starts at \(1\). But we can rewrite.
\[ \begin{aligned} r(x,w) &= \sum_{i=1}^{\infty} 10^{-iw}x \\ &= \sum_{i=0}^{\infty} 10^{-(i+1)w}x \\ &= \sum_{i=0}^{\infty} 10^{-w}10^{-iw}x \\ &= \sum_{i=0}^{\infty} (10^{-w}x)((10^{-w})^i) \end{aligned} \]
… which is the geometric series with
\[ \begin{aligned} a &= 10^{-w}x \\ z &= 10^{-w} = \frac{1}{10^w} \end{aligned} \]
so…
\[ \begin{aligned} r(x,w) &= \frac{a}{1-z} \\ &= \frac{10^{-w}x}{1-\frac{1}{10^w}} \\ &= \frac{10^w \times 10^{-w}x}{10^w \times (1-\frac{1}{10^w})} \\ &= \frac{x}{10^w-1} \end{aligned} \]
And \(10^w-1\) is the formal way of saying \(w\) nines, e.g. \[ \begin{aligned} w=2 \rightarrow 10^2 - 1 &= 100 - 1 &= 99 \\ w=4 \rightarrow 10^4 - 1 &= 10000 - 1 &= 9999 \end{aligned} \]
So, if \(c \in \mathbb{Z} > 0\), and we know \(r(x,w) = \frac{x}{10^w-1}\):
Quod erat demonstrandum: you can multiply or divide through the overline.
\[ \begin{aligned} 1 = 9 \times \frac{1}{9} &= 9 \times 0.\overline{1} \\ &= 0.\overline{9} \\ 1 = 3 \times \frac{1}{3} &= 3 \times \frac{3}{9} \\ &= 3 \times 0.\overline{3} \\ &= 0.\overline{9} \end{aligned} \]
… because we just established you can multiply through an overline. But we can also show it with… content warning… basic calculus.
We could show it again using the geometric series, but we can also go back to the basic definitions of infinite sums and limits.
\[ \begin{aligned} 0.\overline{9} &= \sum_{i=0}^{\infty} 9 \times 10^{-(i+1)} \\ &= \lim_{x \rightarrow \infty} \sum_{i=0}^x 9 \times 10^{-(i+1)} \end{aligned} \]
\(0.\overline{9}\), by virtue of being an infinite sum, is by definition a limit as defined in chapter 1 of your calculus book. For any finite \(x\), you get that many nines after the decimal point; the sum is finite and gets closer and closer to \(1\) without ever reaching it, but the repeating decimal represents an infinite sum which is equal to the limit, not to any intermediate term or sum.
Consider \(S_{x} = \sum_{i=0}^x 9 \times 10^{-(i+1)}\) – the \(x\)th approximation of the limit. \(S_{x}\) is equal to \(x+1\) nines after the decimal point.
\[ \begin{aligned} S_{0} &= 0.9 \\ S_{1} &= 0.99 \\ S_{2} &= 0.999 \\ S_{3} &= 0.9999 \\ ... \end{aligned} \]
To prove that \(\lim_{x \rightarrow \infty} S_{x} = 1\), we’ll use Wikipedia’s formulation:
the “limit of \(f\) as \(x\) tends to positive infinity” is defined as a value \(L\) such that, given any real \(\epsilon > 0\), there exists an \(M > 0\) such that for any \(x > M\), \(\lvert f(x)-L \rvert<\epsilon\).
To prove that \(L=1\), first note that \(1-S{x} = 10^{-(x+1)}\).
\[ \begin{aligned} 1 - S_{0} &= 1 - 0.9 &= 0.1 &= 10^{-1} \\ 1 - S_{1} &= 1 - 0.99 &= 0.01 &= 10^{-2} \\ 1 - S_{2} &= 1 - 0.999 &= 0.001 &= 10^{-2} \\ 1 - S_{3} &= 1 - 0.9999 &= 0.0001 &= 10^{-3} \\ ... \end{aligned} \]
\(10\) to any real power is positive, so \(\lvert S_{x}-1 \rvert = \lvert 1-S_{x} \rvert = 10^{-(x+1)}\), and we want \(M > 0\) such that for \(x > M\), \(10^{-(x+1)} < \epsilon\).
\[ \begin{aligned} 10^{-(x+1)} &< \epsilon \\ -(x+1) &< \log_{10} \epsilon \\ (x+1) &> \log_{10} \epsilon \\ x &> \log_{10} \epsilon - 1 \\ M &= \log_{10} \epsilon - 1 \end{aligned} \]
For any number just slightly less than \(1\), no matter how slightly, we’ve proven that we can get closer than that by piling on nines, and that as we pile on more nines we’ll only get closer. Which is obvious, but the whole game I’m playing here is expressing obvious things rigorously.
Quod erat demonstrandum: \(1 = 0.\overline{9}\) and math is pure entertainment.
