The Cool Thing about Repeating Decimals

Get out your calculator and type in 331/999 and press enter. What do you get? Something along the lines of 0.331331331…? Now type in 21/9999 and press enter. What do you get? 0.002100210021…? This cool trick works with any fraction less than 1 with all nines in the denominator, which are always of the form 10A – 1, for some number A. Here’s a proof:

  • Say x = 0.A1A2A3…An…… (Where x is a repeating decimal, and A1A2A3…An is the string of numbers that is repeated in the decimal, and n is the length of the string)
  • If we multiply both sides by 10n, then we would get: x10n = A1A2A3…An.A1A2A3…An…, because the decimal point is moved n times to the right
  • x10n = A1A2A3…An.A1A2A3…An… is the same thing as A1A2A3…An + 0.A1A2A3…An, and since 0.A1A2A3…An = x, then x10n = A1A2A3…An + x
  • By subtracting both sides of the equation by x, you would get x10n – x = A1A2A3…An, or x(10n – 1) = A1A2A3…An
  • By dividing both sides by 10n – 1, you would get… x = (A1A2A3…An)/(10n – 1)
  • Therefore, by substituting 0.A1A2A3…An… for x, you would get…
  • A1A2A3…An… = (A1A2A3…An)/(10n – 1), where A1A2A3…An is a string of numbers of length n, and 10n – 1 is a string of n 9s, for example 103 – 1 = 1000 – 1 = 999

This proof is a generalization of a trick you learn in middle school. Say you want to convert 0.21… into a fraction. You would set that equal to x to get x = 0.21… and multiply both sides by 100 to get 100x = 21.21…, which is 100x = 21 + 0.21…, or 100x = 21 + x. Next you would subtract x from both sides to get 99x = 21, and x = 21/99. Don’t forget to simplify J.

Note: If you want to do something like 7/99999, add 0s in front of the 7 to make the numerator and denominator have the same number of digits to get 00007/99999, and the decimal of that would be .000070000700007…