You are on page 1of 6

Midy's (Nearly) Secret Theorem: An Extension after 165 Years

Author(s): Brian D. Ginsberg


Source: The College Mathematics Journal, Vol. 35, No. 1 (Jan., 2004), pp. 26-30
Published by: Mathematical Association of America
Stable URL: http://www.jstor.org/stable/4146879 .
Accessed: 31/01/2015 15:41

Your use of the JSTOR archive indicates your acceptance of the Terms & Conditions of Use, available at .
http://www.jstor.org/page/info/about/policies/terms.jsp

.
JSTOR is a not-for-profit service that helps scholars, researchers, and students discover, use, and build upon a wide range of
content in a trusted digital archive. We use information technology and tools to increase productivity and facilitate new forms
of scholarship. For more information about JSTOR, please contact support@jstor.org.

Mathematical Association of America is collaborating with JSTOR to digitize, preserve and extend access to
The College Mathematics Journal.

http://www.jstor.org

This content downloaded from 128.235.251.160 on Sat, 31 Jan 2015 15:41:29 PM


All use subject to JSTOR Terms and Conditions
Midy's (Nearly) Secret Theorem-
An Extension After 165 Years
BrianD. Ginsberg

BrianGinsberg (brian.ginsberg@yale.edu) is a
mathematicsmajorat YaleUniversityin New Haven,CT,in
the class of 2004. His researchinterestsincludediscrete
mathematicsin generaland algebraicgraphtheoryin
particular. Whennot ponderingtheorems,Ginsberg,
originallyfromChicago,enjoysplayingpoker,watchingthe
televisionprogramLaw&Order,and absorbingmovietrivia
of all sorts.

Introduction
In 1836, the French mathematician E. Midy proved an amusing result in number the-
ory: Take a reduced fraction with prime denominator and even period (say 2k), chop
the decimal representation of the period into "halves" (the first k digits and the last k
digits), and add the halves. The sum will always be a string of 9s [1].
In the first improvement made on the theorem since it was stated nearly 166 years
ago, we will use nothing more than elementary number theory to show that an analo-
gous form of this result holds for a wider class of fractions than those Midy originally
considered.

Historical background
Before we begin speaking about the work (or lack thereof) done on Midy's old result,
we should formalize the statement of the theorem so we can proceed in as precise a
fashion as possible.

Theorem 1 (Midy). Let p be prime and let m be coprime to p. For ease of presen-
tation, take m < p. Suppose Pmhas period 2k for some positive integer k and write
k digits k digits k digits
m
A B A
P
In words, A and B are the two k-digit halves (written as integers) of the whole period.
Then A + B = 10k - 1. That is, the sum of the two halves of the period is a string of
k 9s.

For example, consider 7 3 expressed


Al13U
in
11ULIICI
decimal form
I1
as
L

3
- = .428571,
7
where the overbar denotes repetition. Observe 428 + 571 = 999. Note that by [5,
Corollary 2, p. 672] there are many fractions with composite denominators having
the same property, namely those with denominators dividing 10P + 1 where p is an
odd prime.

26 @ THEMATHEMATICAL
ASSOCIATION
OF AMERICA

This content downloaded from 128.235.251.160 on Sat, 31 Jan 2015 15:41:29 PM


All use subject to JSTOR Terms and Conditions
In fact, the theorem as Midy posed it says that the sum of each pair of corresponding
digits in A and B is 9 (4 + 5 = 9, 2 + 7 = 9, and 8 + 1 = 9.). This fact does not lend
itself well to extension, however, so we will not treat it in our analysis.
About 45 years ago, Hans Rademacher and Otto Toeplitz offered an elementary
proof of the theorem (though Midy's name was nowhere to be found) using very simple
theorems on decimal expansion and divisibility [6]. Ten years later, in 1967, W. G.
Leavitt proved Midy's theorem in considerably more detail using algebraic notions,
such as the order of an element in a group, as part of a unified retelling (and reproving)
of some key facts about periodicity [5].
The above items, along with terse references in popular books by Martin Gard-
ner [2] and Midhat Gazal6 [3], seem to exhaust attention to Midy's theorem in the
literature. In the more than 1.5 centuries since the theorem was first stated, it has not
been extended to anything beyond reduced fractions of even period-until now.
1
Recently, the author was experimenting with pure prime reciprocals of period 3k
and noticed they possess an analogous form of what Leavitt called the "nines prop-
erty" [5]. That is, splitting the period into k-digit thirds and adding them yields a
string of k 9s. What follows is a more formal statement-and a complete proof-of
this Midy-type theorem. But before we jump right into a proof of the extension, let
us review the easy proof of the original theorem. We borrow many of its ideas and
techniques for the harderproof.

A proof of Midy'stheorem
We need to state a couple of key facts about periodic decimals:

Fact 1. Any reducedfraction with prime denominator differentfrom 2 or 5 is purely


periodic. Furthermore, we can represent such a number m
P
as

m [axaxa- ... all


p 10- 1
Here [axax --.- al] is a I-digit integer consisting of the decimal digits of the pe-
riod [4].

Fact 2. Suppose the decimal expansion of 1 has period L. Then the decimal expan-
P

sion of any integer multiple of 1 also has period 1 [4].


P

By convention, we take the period of a decimal expansion be the smallest possible


I conforming to Fact 1. Remarkably, this is all the machinery we need to prove the
original theorem.

p has period 2k by assumption, we can write its


Proof ofMidy's theorem. Since m
decimal expansion as

m lOkA + B
p 102k 1 (1)

10kA + B
(10k - 1)(10k + 1)

VOL. 35, NO. 1, JANUARY2004 THE COLLEGE MATHEMATICSJOURNAL 27

This content downloaded from 128.235.251.160 on Sat, 31 Jan 2015 15:41:29 PM


All use subject to JSTOR Terms and Conditions
and hence

(10kA + B)p = m(lOk - 1)(10k + 1).


Since p is prime, it must divide at least one of {m, 10k - 1, 10k + 1}, but it cannot
divide m by assumption, and it cannot divide 10k - 1 because then the decimal ex-
pansion would have period k rather than 2k. Thus we have p I 10k + 1. This lets us
rearrange (1) to read

m(10k + 1) 10kA + B A+ B
- =A (2)
p 10k - 1 +. 10k _1
The left-hand side of (2) is a whole number since p I 10k + 1; hence, so is the right-
hand side. But A is a whole number, so therefore A+B must be a whole number as
well.
Recall A and B have k digits each, and note that 10k - 1 is the largest k-digit num-
ber. Thus we automatically have A, B < 10k - 1, whereupon A + B < 2(10k - 1).
Now suppose (for contradiction) that equality occurs; that is, suppose A + B
2(10k - 1). This means that A, B are maximal and hence
2k 9s

10kA + B = 10k(10k - 1)+ 10k - 1 = 102k- 1 = 99 ... 9

Thus " has period 1, which is contradictory. Therefore, we can assert the strict in-
p
equality A + B < 2(10k - 1). But since AtB must be a whole number, and since we
are obviously unconcerned with digits that are all 0, we have A + B = 10k - 1 as was
to be shown. U

Extending the theorem


The proof of Midy's theorem works equally well with general reduced fractions and
pure prime reciprocals (m = 1). However, the 3k-analog of the theorem fails for a
general E. Recall our earlier example 3, but this time consider it as a fraction of pe-
riod 3k. Then the sum of the thirds of the period is 42 + 85 + 71 = 198-not a string
of 9s. Nevertheless, the parallel result does remain true for pure prime reciprocals
(such as 1), as we shall soon show.

A 3k-analog of Midy'stheorem
Now that we are familiar with the formal statement of the original theorem, we are
ready for the analogous statement of the proposed extension:

Theorem 2 (3k-analog of Midy's theorem). Let p be primeand suppose


k digits k digits k digits k digits

-=. A B C A
p
In words, A, B, and C are the three k-digit thirds of the whole period. Then A + B -
C = 10k- 1.

28 @ THEMATHEMATICAL OF AMERICA
ASSOCIATION

This content downloaded from 128.235.251.160 on Sat, 31 Jan 2015 15:41:29 PM


All use subject to JSTOR Terms and Conditions
Proof Since the decimal expansion of ?P has period 3k, we can write

1 A102k + B10k + C
p (3)
p = 103k_ 1 .

Thusp I (103k - 1) = (10k - 1)(102k + 10k + 1) SOP (102k + 10k + 1). Then,from
(3) we obtain

102k + 10k + 1 A102k+ B10k + C A+ B+ C


+ A+ B+ (4)
p 10kk10k
- 1 .
10~k- 1

Thus A+B+C is an integer, and since each A, B, C < 10k - 1 (and cannot all equal
10k - 1), either

A+B+C
=1 (5)
10k - 1
or

A + B +C
= 2. (6)
10k - 1
Note that this part of the proof works equally well for any fraction with period 3k,
_
so in any case (5) or (6) is valid. We need to disqualify the latter possibility. To do this,
we shall suppose it is true and argue by contradiction via two exhaustive cases.

Case 1 (A = 0). By assumption, we have B + C =- 2(10k - 1) which in turn


means B = C --= 10k - 1 (since B, C < 10k - 1 as they cannot individually exceed k
digits in length). But inverting (3) yields

103k - 1 (10k - 1)(102k + 10k + 1)


P A102k ~B10k + C (10k k
1)10k + 10-
102k+ 10k + 1 1
S- 10k +
+
10k 1 10k + 1'
which is a contradiction since p is an integer but the final expression clearly is not.
This concludes the first case.

Case 2 (A 0 0). This means A > 1. Also no matter how large A is, at least one of
{B, C} must be non-zero in order for (6) to hold. Thus, we can use (say) (4) to obtain
A < k (whichin turnmeansp < 10k). Since B < 10k - 1, we can put a lowerbound
on C, to wit:

C = 2(10k - 1) - (A + B)

> 2(10k -1) (Io +10k


2(( 10+k1

10k 10k
-= p

VOL. 35, NO. 1, JANUARY2004 THE COLLEGE MATHEMATICSJOURNAL 29

This content downloaded from 128.235.251.160 on Sat, 31 Jan 2015 15:41:29 PM


All use subject to JSTOR Terms and Conditions
This allows us to multiply through by p and write the two-sided inequality

10kp - 10k - p < Cp < (k10- )p. (7)

Now, the formof C is quitespecific.In fact, from (3) we obtain

Cp + 1 = 103k - A102kp - B10kp,


from which we conclude Cp + 1 0(mod 0 10k). Put another way, we can find some
integer m such that Cp + 1 = 10km. Let us rewrite (7) using this congruence, while
also tidying up the left-hand side and dividing through by 10k, viz.:

p-1
Pi
(p-1I
I10ok o10k)
This leads to the very restrictive estimate

p-2<m <p,

whereupon m = p - 1. This in turn means Cp + 1 = 10k(p - 1), or equivalently that

Cp = 10kp - (10k + 1).


Since the left-hand side is divisible by p, so must be the right-hand side, which further
implies p I 10k + 1. But clearing denominators in (3) and factoring gives us

(10k - 1)(102k + 10k + 1) = p(A102k + B10k + C).

Observe that p cannot divide 10k - 1 because then ? would not have period 3k as
P
assumed. Thus p I 102k + 10k + 1. But we also have p I 10k + 1, whence p divides
the difference; that is, p I 102k. But note that 102k consists only of 2s and 5s, which
means either p = 2 or p = 5. But in these cases, the reciprocal is not periodic at
all. Thus we obtain another contradiction which concludes this case and proves the
theorem. N

Acknowledgment. The authorwas supportedby NSF VIGREgrantDMS-9983403.The au-


thor is indebtedto Roger Howe of the Yale MathematicsDepartmentfor his guidanceand
insight. The authoralso thanksthe participantsin the Summer2002 AlgebraicCodingThe-
ory VIGRESeminarat Yale,in particularMarcWizniawho unknowinglyconjecturedMidy's
originaltheorem.Finally,the authoris gratefulto W. G. Leavittof the Universityof Nebraska
at Lincolnfor his enthusiasticcorrespondence.

References
1. L. E. Dickson, Historyof the Theoryof Numbers,vol. 1, CambridgeInstituteof Washington,1919.
2. M. Gardner,MathematicalCircus, MathematicalAssociation of America,Washington,D.C., 1992.
3. M. Gazale, Number:FromAhmes to Cantor,PrincetonUniversityPress, Princeton,2000.
4. G. H. Hardyand E. M. Wright,An Introductionto the Theoryof Numbers,4th ed., Oxford UniversityPress,
London, 1960.
5. W. G. Leavitt,A theoremon repeatingdecimals,AmericanMathematicalMonthly74(6) June-July1967, 669-
773.
6. H. Rademacherand 0. Toeplitz, TheEnjoymentof Mathematics,PrincetonUniversityPress, Princeton,1957.

30 @ THEMATHEMATICAL
ASSOCIATION
OF AMERICA

This content downloaded from 128.235.251.160 on Sat, 31 Jan 2015 15:41:29 PM


All use subject to JSTOR Terms and Conditions

You might also like