As a child, I developed in interest in fractions and decimals, and this is something I noticed.
The decimal expansion of 1/7 is .r142857. (I adopted the notation of placing an "r" before the repeating portion of a decimal, when a bar over the top wasn't feasible.) It has an even number of digits, and if it's split into two groups, the sum is 999.
Many prime fractions have this property, and many don't. For instance, 1/37 = .r027. Or, perhaps closer to home, 1/3 = .r3. If the decimal expansion has an even number of digits, it has this property.
The product of the denominator and the decimal expansion will naturally be 10n - 1, where n is the number of digits in the expansion. So if n is even, n/2 is an integer, and the product can be factored as (10n/2 + 1)(10n/2 - 1). Since the denominator is a prime number and it divides the product, it necessarily divides exactly one of the factors. (No number could divide both, since they're odd numbers with a difference of 2.) Because 10n - 1 is the smallest number with all 9s that the denominator divides, it follows that the denominator must divide (10n/2 + 1).
So what's the consequence of that? It means that (10n/2) divided by the denominator leaves a remainder of one less than the denominator. In the case of 1/7, n is 6 (because the decimal expansion is six digits long), so 10n/2 is 1,000; and, since 1,001 is evenly divisible by 7, 1,000 divided by 7 leaves a remainder of 6.
So what does this have to do with the decimal expansion being split into two groups whose sum is all 9s? Well, think of it this way. If you divide 10n by the denominator, you'll get one iteration of the decimal expansion, and you'll have 1 left over: 1,000,000 / 7 = 142,857, remainder 1. This sets you up for the next iteration. (If you divided 2,000,000 by 7, you'd get 285,714, remainder 2; etc.)
If you instead divide 10n/2 by the denominator, you'll get the first half of one iteration, and you'll have one less than the denominator as your remainder. Example: 1,000 / 7 = 142, remainder 6. This sets you up to divide 6,000 by 7, which will get you back to a remainder of 1.
The general idea is this: (1 / x) + ((x-1) / x) = (x / x) = 1. When the decimal expansion of a prime fraction has an even number of digits, both 1 and x-1 will be included in the same cycle for the reason explained above. (That is, if x divides 10n and n is even, x must also divide 10n/2+1.) If the expansion has an odd number of digits, they will be in different cycles.