Math lovers uncovered something strange going on with the number 998,001. If you divide 1 by 998,001, the resulting decimal number will give you almost every three-digit number. For example, the decimal starts as follows: 0.000001002003004005006 … and so on. However, one three-digit number gets skipped in this strange series.
The three-digit number missing from the equation is 998. Strangely, the number jumps from 997 to 999. The number 998,001 is actually part of a small family of numbers with interesting mathematical quirks: the numbers that are the squares of repeating 9s. 998,001 happens to be the square of 999.
If you divide 1 by 9,801 (which is the square of 99), you’ll get a similar answer: all the two-digit numbers in a series except 98. If you divide 1 by 99,980,001 (the square of 9,999), you will get all the four-digit numbers other than 9,998. Similarly, if you divide 1 by 81 (the square of 9), the result will be .012345679012345679 … all the single-digit numbers except 8, continuing on in that pattern to infinity.
Make Your Own Repeating Decimals
Calculating any of these equations for yourself by hand is likely to take a very long time. Fortunately, you can use your newfound knowledge of how these numbers work to create any recurring decimal pattern you want. The trick is to define the number of digits you want in each number, then find the square of a number with that many repeating 9s and divide 1 by that number.
This means that if you want to get .012345679 repeating as your answer — that is, a single-digit number that climbs consecutively — you’d find the square of 9 and divide 1 by that to get 1/81. That fraction, represented as a decimal, would be the exact same single-digit repeating series described above.
If you create an infinite series that follows the pattern 1 + 2x + 3x2 + 4x3, and x is less than 1, the entire series will simplify to 1 divided by the square of 1-x. You can use this series to create recurring decimals as well. For instance, if you define x as 1/10, the entire series will produce 100/81 as a result, which will create a similar recurring series to the one described above.
Is This Useful?
At first glance, it might seem like creating equations to produce recurring decimals is a completely trivial math trick. However, being able to create equations for recurring decimals is actually useful for a wide range of tasks. Cryptographers and cybersecurity professionals can take repeating decimals and express them as binary numbers in order to test random-number generators.
It probably won’t surprise you to find out that most random-number generators aren’t all that random. Computers can’t really pull numbers out of thin air, so they have two options: One is to rely on external data to generate a truly random number that can then be turned into a cryptographic key that can’t be guessed or hacked. The other is a pseudorandom number generator, which typically relies on a secret algorithm and a seed value that is actually random but doesn’t change.
If a computer system encrypts its information according to a not-so-random generator that relies entirely on these internal mechanics to produce pseudorandom numbers, then it’s possible to test the security of that system using repeating decimals exactly like the ones described above, expressed as binary code.