Split a repeating decimal's cycle in half, add the two halves, and get all nines
Divide 1 by 7 and you get 0.142857142857 repeating forever, a six-digit block. Split that block exactly in half — 142 and 857 — and add the two halves together: 142 + 857 = 999. Try the same trick on 1/17 or 1/19, any similar fraction with an even-length repeating cycle. Does the 'split and add to all nines' trick always work, and why would it?
Reveal the answer
It does always work for any fraction 1/p, where p is a prime number other than 2 or 5, as long as its repeating decimal block has an even number of digits. French mathematician Etienne Midy proved this in 1836, in a result now called Midy's theorem. It follows from how modular arithmetic forces the two halves of the repeating cycle to be mirror images of each other, each digit swapping with its complement to 9.
— Etienne Midy, De quelques proprietes des nombres et des fractions decimales periodiques — 1836