If the period of a repeating decimal for , where is prime and is a reduced fraction, has an even number of digits, then dividing the repeating portion into halves and adding gives a string of 9s. For example, , and .
Midy's Theorem
See also
Decimal Expansion, Repeating DecimalExplore with Wolfram|Alpha
References
Rademacher, H. and Toeplitz, O. The Enjoyment of Mathematics: Selections from Mathematics for the Amateur. Princeton, NJ: Princeton University Press, pp. 158-160, 1957.Referenced on Wolfram|Alpha
Midy's TheoremCite this as:
Weisstein, Eric W. "Midy's Theorem." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/MidysTheorem.html