“Your small minds are musclebound with suspicion … because the only exercise you ever get is jumping to conclusions.”
That’s Danny Kaye as Walter Mitty in a 1947 movie to be remade casting Mike Myers. [Kaye, author James Thurber and many others were accused of being Communists in the propaganda pamphlet Red Stars #3 published in 1960 (!) by the Cinema Educational Guild.]
In the 1830s a Professor of Mathematics to the College of Nantes France published the following works:
The Calculation of simple and compound interest rates, simplified with a mental addition of two numbers,
Arithmetic, commercial, industrial and administrative, simplifed to addition by the Reformed system of calculation,
A Theorem of Mr. Sturm, and its numerical applications,
A novel Shorthand, improvement to what is written in the margins (re: Fermat’s Last Theorem?), and
a 21-page book, De Quelques Propriétés des Nombres et des Fractions Décimales Périodiques proving a theorem eventually named after him.
Midy’s Theorem is a very pretty result. It was neglected by mathematicians until 2003 when Yale undergraduate Brian Ginsberg published an extension in a student paper. Since then there have been numerous papers with generalizations. So what is this theorem?
Rational numbers, which are defined as fractions of two integers p and q, viz., p/q, when represented as a decimal expansion come in two forms: finite decimals, e.g., 1/5 = 0.2; and repeating decimals, e.g., 1/6 = 0.1666…, which is usually shown using the vinculum, viz., 1/6 = 0.16. Since 1/6 is the product of a finite decimal 0.5 and a repeating decimal 0.3, as David Wells shows in his wonderful book, 1/6 has a nonperiodic part whose length is the same as that of 1/2, and a periodic part with period equal to the period of 1/3. By multiplying by a power of 10 we can convert any p/q to p’/q, where p’/q is a pure repeating decimal.
The nice thing is that the period only ever depends on q. Anticipating by 120 years mathematicians’ keen interest in modular forms, these periods were first related to the multiplicative order of 10 (mod q), in other words, the smallest exponent, e, such that 10e (mod q) = 1, by J. W. L. Glaisher in 1878! [Papa Glaisher's balloon exploits] Thus:
10 mod 7 = 3
100 mod 7 = 2
1000 mod 7 = 6
10000 mod 7 = 4
100000 mod 7 = 5
1000000 mod 7 = 1
So the multiplicative order of 10 (mod 7) is 6, and 1/7 as a repeated decimal has period 6.
Now consider rationals that have representations as pure repeating decimals where the period is even, such as:
- 1/7 = 0.142857
- 1/77 = 0.012987
- 1/121 = 0.0082644628099173553719
- 1/803 = 0.00124533
Breaking these periodic strings in half and adding yields 999, 999, 99999999999, and 4545, respectively. Those strings of 9‘s can’t be a coincidence, and Midy’s Theorem tells us exactly when to expect them, namely:
If p/q is a fraction written in lowest terms and a pure repeating decimal of period 2k, and q is not divisible by 10, then the ‘nines property’ holds iff:
- q is a prime or
- q is a prime power; or
- the gcd(q, 10k – 1) = 1, where gcd is the greatest common denominator.
Thus, 7 is a prime, 121 is a prime power (112), and gcd(77, 999) = 1, whereas gcd(803, 9999) = 11. In 2003 Ginsberg extended Midy’s result and things progressed quickly.
Ginsberg chopped in three repeating decimals where the period is of length 3k, and showed that the nines property holds if p is 1 and q is prime. In 2005 Gupta and Sury (pdf) solve the problem of 1/q where q is prime in complete generality. Also in 2005 Abdul-Baki (pdf) has some imaginative, true things to say about Midy.
In early 2006 Gil and Weiner (pdf) extend Midy’s Theorem, for 1/q where q is prime, to other bases. Later in 2006 Lewittes (pdf) extends Midy in general to other bases, and extends Ginsberg’s extension, e.g., it holds for 1/21 = 0.047619, 04 + 76 + 19 = 99. Also in 2006 Martin (Integers vol. 7) generalizes Midy’s result for chopping pure repeating decimals of the form 1/q into arbitrary fixed size commensurable pieces.
Chopping into arbitrary fixed size commensurable pieces in arbitrary bases does not seem to obey any obvious pattern. There is more work ahead on extending this no-longer-so-secret theorem.
If only one person knows the truth, it is still the truth. – Mahatma Gandhi