Midy's theorem

Last updated

In mathematics, Midy's theorem, named after French mathematician E. Midy, [1] is a statement about the decimal expansion of fractions a/p where p is a prime and a/p has a repeating decimal expansion with an even period (sequence A028416 in the OEIS ). If the period of the decimal representation of a/p is 2n, so that

Contents

then the digits in the second half of the repeating decimal period are the 9s complement of the corresponding digits in its first half. In other words,

For example,

Extended Midy's theorem

If k is any divisor of h (where h is the number of digits of the period of the decimal expansion of a/p (where p is again a prime)), then Midy's theorem can be generalised as follows. The extended Midy's theorem [2] states that if the repeating portion of the decimal expansion of a/p is divided into k-digit numbers, then their sum is a multiple of 10k  1.

For example,

has a period of 18. Dividing the repeating portion into 6-digit numbers and summing them gives

Similarly, dividing the repeating portion into 3-digit numbers and summing them gives

Midy's theorem in other bases

Midy's theorem and its extension do not depend on special properties of the decimal expansion, but work equally well in any base b, provided we replace 10k  1 with bk  1 and carry out addition in base b.

For example, in octal

In duodecimal (using inverted two and three for ten and eleven, respectively)

Proof of Midy's theorem

Short proofs of Midy's theorem can be given using results from group theory. However, it is also possible to prove Midy's theorem using elementary algebra and modular arithmetic:

Let p be a prime and a/p be a fraction between 0 and 1. Suppose the expansion of a/p in base b has a period of , so

where N is the integer whose expansion in base b is the string a1a2...a.

Note that b   1 is a multiple of p because (b   1)a/p is an integer. Also bn1 is not a multiple of p for any value of n less than , because otherwise the repeating period of a/p in base b would be less than .

Now suppose that  = hk. Then b   1 is a multiple of bk  1. (To see this, substitute x for bk; then b = xh and x  1 is a factor of xh  1. ) Say b   1 = m(bk  1), so

But b   1 is a multiple of p; bk  1 is not a multiple of p (because k is less than  ); and p is a prime; so m must be a multiple of p and

is an integer. In other words,

Now split the string a1a2...a into h equal parts of length k, and let these represent the integers N0...Nh  1 in base b, so that

To prove Midy's extended theorem in base b we must show that the sum of the h integers Ni is a multiple of bk  1.

Since bk is congruent to 1 modulo bk  1, any power of bk will also be congruent to 1 modulo bk  1. So

which proves Midy's extended theorem in base b.

To prove the original Midy's theorem, take the special case where h = 2. Note that N0 and N1 are both represented by strings of k digits in base b so both satisfy

N0 and N1 cannot both equal 0 (otherwise a/p = 0) and cannot both equal bk  1 (otherwise a/p = 1), so

and since N0 + N1 is a multiple of bk  1, it follows that

Corollary

From the above,

is an integer

Thus

And thus for

For and is an integer

and so on.

Notes

  1. Leavitt, William G. (June 1967). "A Theorem on Repeating Decimals". The American Mathematical Monthly. Mathematical Association of America. 74 (6): 669–673. doi:10.2307/2314251. JSTOR   2314251.
  2. Bassam Abdul-Baki, Extended Midy's Theorem, 2005.

Related Research Articles

<span class="mw-page-title-main">Chinese remainder theorem</span> Theorem for solving simultaneous congruences

In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer n by several integers, then one can determine uniquely the remainder of the division of n by the product of these integers, under the condition that the divisors are pairwise coprime.

<span class="mw-page-title-main">Modular arithmetic</span> Computation modulo a fixed integer

In mathematics, modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" when reaching a certain value, called the modulus. The modern approach to modular arithmetic was developed by Carl Friedrich Gauss in his book Disquisitiones Arithmeticae, published in 1801.

<span class="mw-page-title-main">Factorization</span> (Mathematical) decomposition into a product

In mathematics, factorization (or factorisation, see English spelling differences) or factoring consists of writing a number or another mathematical object as a product of several factors, usually smaller or simpler objects of the same kind. For example, 3 × 5 is an integer factorization of 15, and (x – 2)(x + 2) is a polynomial factorization of x2 – 4.

This article collects together a variety of proofs of Fermat's little theorem, which states that

In mathematics, a Cunningham chain is a certain sequence of prime numbers. Cunningham chains are named after mathematician A. J. C. Cunningham. They are also called chains of nearly doubled primes.

<span class="mw-page-title-main">Lagrange's four-square theorem</span> Every natural number can be represented as the sum of four integer squares

Lagrange's four-square theorem, also known as Bachet's conjecture, states that every natural number can be represented as a sum of four non-negative integer squares. That is, the squares form an additive basis of order four.

In number theory, a formula for primes is a formula generating the prime numbers, exactly and without exception. No such formula which is efficiently computable is known. A number of constraints are known, showing what such a "formula" can and cannot be.

<span class="mw-page-title-main">Carmichael function</span> Function in mathematical number theory

In number theory, a branch of mathematics, the Carmichael functionλ(n) of a positive integer n is the smallest positive integer m such that

<span class="mw-page-title-main">Schönhage–Strassen algorithm</span> Multiplication algorithm

The Schönhage–Strassen algorithm is an asymptotically fast multiplication algorithm for large integers, published by Arnold Schönhage and Volker Strassen in 1971. It works by recursively applying fast Fourier transform (FFT) over the integers modulo 2n+1. The run-time bit complexity to multiply two n-digit numbers using the algorithm is in big O notation.

In mathematics, Hensel's lemma, also known as Hensel's lifting lemma, named after Kurt Hensel, is a result in modular arithmetic, stating that if a univariate polynomial has a simple root modulo a prime number p, then this root can be lifted to a unique root modulo any higher power of p. More generally, if a polynomial factors modulo p into two coprime polynomials, this factorization can be lifted to a factorization modulo any higher power of p.

In additive number theory, Fermat's theorem on sums of two squares states that an odd prime p can be expressed as:

Bijective numeration is any numeral system in which every non-negative integer can be represented in exactly one way using a finite string of digits. The name refers to the bijection that exists in this case between the set of non-negative integers and the set of finite strings using a finite set of symbols.

Gauss's lemma in number theory gives a condition for an integer to be a quadratic residue. Although it is not useful computationally, it has theoretical significance, being involved in some proofs of quadratic reciprocity.

A decimal representation of a non-negative real number r is its expression as a sequence of symbols consisting of decimal digits traditionally written with a single separator:

In mathematics, an infinite periodic continued fraction is a continued fraction that can be placed in the form

A repeating decimal or recurring decimal is decimal representation of a number whose digits are periodic and the infinitely repeated portion is not zero. It can be shown that a number is rational if and only if its decimal representation is repeating or terminating. For example, the decimal representation of 1/3 becomes periodic just after the decimal point, repeating the single digit "3" forever, i.e. 0.333.... A more complicated example is 3227/555, whose decimal becomes periodic at the second digit following the decimal point and then repeats the sequence "144" forever, i.e. 5.8144144144.... At present, there is no single universally accepted notation or phrasing for repeating decimals. Another example of this is 593/53, which becomes periodic after the decimal point, repeating the 13-digit pattern "1886792452830" forever, i.e. 11.18867924528301886792452830....

Quartic or biquadratic reciprocity is a collection of theorems in elementary and algebraic number theory that state conditions under which the congruence x4p is solvable; the word "reciprocity" comes from the form of some of these theorems, in that they relate the solvability of the congruence x4p to that of x4q.

In number theory, the Fermat quotient of an integer a with respect to an odd prime p is defined as

In number theory, a kth root of unity modulo n for positive integers k, n ≥ 2, is a root of unity in the ring of integers modulo n; that is, a solution x to the equation . If k is the smallest such exponent for x, then x is called a primitive kth root of unity modulo n. See modular arithmetic for notation and terminology.

In algebraic number theory Eisenstein's reciprocity law is a reciprocity law that extends the law of quadratic reciprocity and the cubic reciprocity law to residues of higher powers. It is one of the earliest and simplest of the higher reciprocity laws, and is a consequence of several later and stronger reciprocity laws such as the Artin reciprocity law. It was introduced by Eisenstein (1850), though Jacobi had previously announced a similar result for the special cases of 5th, 8th and 12th powers in 1839.

References