A Curious Property of the Decimal Expansion of Reciprocals of Primes

Similar documents
An Alternate Method to Compute the Decimal Expansion of Rational Numbers

Math 4400/6400 Homework #8 solutions. 1. Let P be an odd integer (not necessarily prime). Show that modulo 2,

MATH 3240Q Introduction to Number Theory Homework 7

MATH342 Practice Exam

CERIAS Tech Report The period of the Bell numbers modulo a prime by Peter Montgomery, Sangil Nahm, Samuel Wagstaff Jr Center for Education

On generalizing happy numbers to fractional base number systems

Practice Final Solutions

By Evan Chen OTIS, Internal Use

Practice Final Solutions

Math 104B: Number Theory II (Winter 2012)

ARITHMETIC PROGRESSIONS OF POLYGONAL NUMBERS WITH COMMON DIFFERENCE A POLYGONAL NUMBER

A CONCRETE EXAMPLE OF PRIME BEHAVIOR IN QUADRATIC FIELDS. 1. Abstract

MATH 361: NUMBER THEORY EIGHTH LECTURE

Number Theory Naoki Sato

QUADRATIC RECIPROCITY

QUADRATIC RECIPROCITY

MA3H1 Topics in Number Theory. Samir Siksek

A CRITERION FOR POLYNOMIALS TO BE CONGRUENT TO THE PRODUCT OF LINEAR POLYNOMIALS (mod p) ZHI-HONG SUN

On the Multiplicative Order of a n Modulo n

3 Properties of Dedekind domains

x 2 a mod m. has a solution. Theorem 13.2 (Euler s Criterion). Let p be an odd prime. The congruence x 2 1 mod p,

Characteristics of Fibonacci-type Sequences

PARTITIONS AND (2k + 1) CORES. 1. Introduction

Dirichlet s Theorem on Arithmetic Progressions

Chapter 3. Number Theory. Part of G12ALN. Contents

Infinitely Many Quadratic Diophantine Equations Solvable Everywhere Locally, But Not Solvable Globally

MA3H1 TOPICS IN NUMBER THEORY PART III

CONGRUENCE PROPERTIES MODULO 5 AND 7 FOR THE POD FUNCTION

Algebraic Number Theory

MAS 4203 Number Theory. M. Yotov

Almost 4000 years ago, Babylonians had discovered the following approximation to. x 2 dy 2 =1, (5.0.2)

Examples from Elements of Theory of Computation. Abstract. Introduction

HENSEL S LEMMA KEITH CONRAD

Representing Integers as the Sum of Two Squares in the Ring Z n

1 Integers and the Euclidean algorithm

Pythagorean triples and sums of squares

The Euler Phi Function

When do Fibonacci invertible classes modulo M form a subgroup?

Diophantine Equations and Congruences

On the Diophantine Equation x 2 = 4q n 4q m + 9

Verifying Two Conjectures on Generalized Elite Primes

Almost All Palindromes Are Composite

Quadratic Reciprocity

ON THE LEAST SIGNIFICANT p ADIC DIGITS OF CERTAIN LUCAS NUMBERS

Primes of the form ±a 2 ± qb 2

Elementary Number Theory

Intrinsic Approximation on Cantor-like Sets, a Problem of Mahler

PRIME NUMBERS YANKI LEKILI

Introductory Number Theory

MPRI Cours I. Motivations. Lecture VI: continued fractions and applications. II. Continued fractions

#A47 INTEGERS 15 (2015) QUADRATIC DIOPHANTINE EQUATIONS WITH INFINITELY MANY SOLUTIONS IN POSITIVE INTEGERS

Introduction to Arithmetic Geometry Fall 2013 Lecture #10 10/8/2013

AN INTRODUCTION TO GAUSS S NUMBER THEORY. Andrew Granville

Quadratic Residues, Quadratic Reciprocity. 2 4 So we may as well start with x 2 a mod p. p 1 1 mod p a 2 ±1 mod p

Maths 4 Number Theory Notes 2012 Chris Smyth, University of Edinburgh ed.ac.uk

On the irreducibility of a polynomial associated with the Strong Factorial Conjecture

Elliptic Curves Spring 2015 Problem Set #1 Due: 02/13/2015

Math 261 Exam 2. November 7, The use of notes and books is NOT allowed.

DIRICHLET S THEOREM ON PRIMES IN ARITHMETIC PROGRESSIONS. 1. Introduction

Then we characterize primes and composite numbers via divisibility

THE DIOPHANTINE EQUATION x 4 +1=Dy 2

arxiv: v5 [math.nt] 22 Aug 2013

HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH

RECIPROCITY LAWS JEREMY BOOHER

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018

Elementary Analysis in Q p

p-adic Measures and Bernoulli Numbers

GAUSSIAN INTEGERS HUNG HO

RINGS OF INTEGERS WITHOUT A POWER BASIS

BEST POSSIBLE DENSITIES OF DICKSON m-tuples, AS A CONSEQUENCE OF ZHANG-MAYNARD-TAO

DISCRIMINANTS IN TOWERS

THE LEAST PRIME QUADRATIC NONRESIDUE IN A PRESCRIBED RESIDUE CLASS MOD 4

Jacobi symbols and application to primality

Chapter 7 Rational and Irrational Numbers

Brownian Motion and Random Prime Factorization

QUADRATIC RESIDUES AND DIFFERENCE SETS

DIVISIBILITY CRITERIA FOR CLASS NUMBERS OF IMAGINARY QUADRATIC FIELDS

When do the Fibonacci invertible classes modulo M form a subgroup?

Mobius Functions, Legendre Symbols, and Discriminants

(Workshop on Harmonic Analysis on symmetric spaces I.S.I. Bangalore : 9th July 2004) B.Sury

An Estimate For Heilbronn s Exponential Sum

Asymptotically exact heuristics for prime divisors of the sequence {a k +b k } k=1

Primes - Problem Sheet 5 - Solutions

Factorability in the ring Z[ 5]

SOME SUMS OVER IRREDUCIBLE POLYNOMIALS

Math 5330 Spring Notes Prime Numbers

Jonathan Sondow 209 West 97th Street, New York, New York

On the Rank of the Elliptic Curve y 2 = x(x p)(x 2)

arxiv:math/ v2 [math.nt] 21 Oct 2004

On Erdős and Sárközy s sequences with Property P

2 Asymptotic density and Dirichlet density

2 Asymptotic density and Dirichlet density

Econometrica Supplementary Material

Solvability and Number of Roots of Bi-Quadratic Equations over p adic Fields

16 The Quadratic Reciprocity Law

QUADRATIC RECIPROCITY

Galois Fields, Linear Feedback Shift Registers and their Applications

Pell's Equation and Fundamental Units Pell's equation was first introduced to me in the number theory class at Caltech that I never comleted. It was r

THUE-VINOGRADOV AND INTEGERS OF THE FORM x 2 + Dy 2. Contents. Introduction Study of an Elementary Proof

BOUNDS FOR THE SIZE OF SETS WITH THE PROPERTY D(n) Andrej Dujella University of Zagreb, Croatia

Transcription:

A Curious Proerty of the Decimal Exansion of Recirocals of Primes Amitabha Triathi January 6, 205 Abstract For rime 2, 5, the decimal exansion of / is urely eriodic. For those rime for which the length of the eriod is even, if we break u the digits in the eriodic art into two equal arts and add, we get a number all of whose digits are 9. We rovide a self-contained and simle roof of this old result of E. Midy. eriod, order, unit A63, A05, A07 The decimal exansion of / when is rime has aroused much renewed curiosity following an article by Brian Ginsberg [2], then an undergraduate student at Yale University, in the College Mathematics Journal in 2004. Ginsberg extended a curious result of E. Midy [9] about the decimal exansion of / in 836 when is a rime distinct from 2 and 5. As often haens in such cases, this result was rediscovered several times, for instance in [6] and []. Midy s Theorem has recently been the subject of much discussion following the article by Ginsberg; for examle, see ([3], [7], [8]). Before we state and rove Midy s Theorem, let us look at some examles. Consider, for instance, the decimal exansions of / for = 7, 3 and 9: 7 = 0.42857 3 = 0.076923 9 = 0.0526357894736842 We observe that the decimal exansion in each case is urely eriodic, and the length of the eriod is even. While the first art is always true for rimes 2, 5, the second art does not always hold; for examle, 3 = 0.3 has eriod length. Midy s result is about rimes for which the decimal exansion of Aeared in Pi Mu Esilon Journal 3 No. 7 (202), 427 430. Indian Institute of Technology, Delhi

/ has even eriod length. In such cases, if we break u the reeating digits into two equal blocks and add we find that we get a number with only 9 s: 42 + 857 = 999; 076 + 923 = 999; 052 63 578 + 947 368 42 = 999 999 999. It is the urose of this short note to exlain this rather curious but not so well known result of Midy. However, before the main result, we give the following characterization of the decimal exansion of rational numbers which is well known (see [5]). The eriod length of the digits in the exansion of / is linked to the following definition. Definition. Let m N. If gcd(a, m) =, the least ositive integer h such that m (a h ) is called the order of a mod m and denoted by ord m a. The existence of ord m a is a consequence of Euler s Theorem, which states that m (a φ(m) ) where φ(m) = m ( ), m with the emty roduct taken as. This is simly Lagrange s Theorem alied to the multilicative grou of units in Z m, whose order is defined to be φ(m). We are now in a osition to exlain the nature of the decimal exansion of rational numbers. Lemma. Let a, n be ositive integers, with n > and gcd(a, n) =. Let n = 2 α 5 β m, with gcd(m, 0) =. Then the decimal exansion of a/n is recurring if and only if m >. Moreover, if m >, the length of the non-recurring art is max{α, β} while that of the recurring art is ord m 0. Proof. The decimal exansion of a/n terminates if and only if a/n is of the form A/0 k for some A, k, which is true if and only if n 0 k. The last statement holds recisely when m =, and this comletes the first art of the lemma. Assume n = 2 α 5 β m, with gcd(m, 0) = and m >. If we reduce each term of the infinite sequence {a0 i } i mod n, by Pigeonhole Princile, two terms must be equal. If we choose the first such air, say a0 s and a0 s+l, then since gcd(a, n) =. Hence 0 s 0 s+l (mod n) 0 l (mod m) since gcd(m, 0) =. Since the congruence imlies that a0 s+k a0 s+l+k (mod n) for each k 0, the length of the eriod equals l = ord m 0. From the first congruence we see that both 2 α and 5 β must divide 0 s since each is corime to 0 l. The smallest such s equals max{α, β}, and this reresents 2

the length of the non-recurring art. Before we look at the roof of Midy s Theorem, let us take another look at the examles we considered at the beginning in light of Lemma. The decimal exansion of / when gcd(, 0) = is urely eriodic, and the length of the eriod is the least ositive integer h such that (0 h ) = } 9. {{.. 9 } consisting of h digits. All we can say for sure is that ord 0 = h must divide φ() =, but it is not ossible to determine h more exlicitly. It is a famous conjecture of C. F. Gauss that there are infinitely many rimes for which the decimal exansion of / has eriod length. Theorem. (Midy) Suose is a rime, 2, 5, for which ord 0 = 2d for some d. Then where a k + a d+k = 9 for k d. = 0.a a 2... a d a d+ a d+2... a 2d, Proof. We know from Lemma that the decimal exansion of / has a urely recurring exansion, and the length of the eriod equals ord 0 = 2d. Let us denote by A k the k-digit number a a 2... a k for k. Since A k is the quotient of 0 k by, we can write 0 k = A k + r k, () with r k <. Since / is the sum of an infinite geometric series with first term A 2d /0 2d and common ratio /0 2d, we have 0 2d = A 2d +. (2) Now ord 0 = 2d imlies (0 d + )(0 d ), so that must divide one of 0 d, 0 d +. But (0 d ) is not ossible since ord 0 = 2d; so must have 0 d (mod ). Thus 0 d = A d + ( ). (3) If we denote by A k the (2d k)-digit number a k+a k+2... a 2d for k, then A 2d = A d 0 d + A d. From (2) and (3) we have ( 0 2d ) (0 d )(0 d ( ) ) A d +A d = A 2d (0 d )A d = = 0 d. Hence the theorem. We close this article by remarking that the result of Midy extends to the decimal exansion of a/ for < a <. Lemma imlies that the decimal exansion of a/ is urely eriodic, with eriod length ord 0. If ord 0 =, then the 3

decimal digits in the exansion of a/ are got by a cyclic shift of those of /. For examle, cyclic shifts of the decimal digits in the exansion of 7 = 0.42857 accounts for 3 7 = 0.42857, 2 7 = 0.28574, 6 7 = 0.85742, 4 7 = 0.57428, 5 7 = 0.74285. If ord 0 = l <, then l ( ) and cyclic shifts of the decimal digits in the exansion of / accounts for l of the fractions a/. The fractions a/ for a are artitioned into ( )/l classes, with the digits in each class obtained from one another by cyclic shifts of the decimal digits. For examle, cyclic shifts of the decimal digits of 3 = 0.076923 accounts for the fractions 0 3 = 0.769230, 9 2 3 = 0.692307, 3 = 0.923076, 3 3 = 0.230769, 4 3 = 0.307692. The remaining fractions, 7 3 = 0.53846, 5 3 = 0.38465, 3 = 0.84653, 6 3 = 0.46538, 8 3 = 0.65384, 2 result from cyclic shifts of 3 = 0.53846. In general, if we start with the decimal exansion of a/, the cyclic shifts results in the decimal exansion of 0a/, 0 2 a/,..., 0 l a/, where l is the eriodic length of the exansion of a/. Theorem easily extends to any a/, where < a <. Indeed, assume as in Theorem, that is a rime, 2, 5, for which ord 0 = 2d for some d. Then a = 0.b b 2... b d b d+ b d+2... b 2d, where b k + b d+k = 9 for k d. To see this, write B k for the k-digit number b b 2... b k for k. Thus with s k <. Hence a 0 k = B k + s k, (4) a 0 2d = B 2d + a, a 0 d = B d + ( a). (5) If we denote by B k the (2d k)-digit number b k+b k+2... b 2d for k, then B 2d = B d 0 d + B d. From (5) we have B d +B d = B 2d (0 d )B d = a( 0 2d ) (0 d )(a 0 d ( a) ) = 0 d. Hence the extension to any a/. References [] Dickson, L. E., History of the Theory of Numbers, Vol., Chelsea Publishing Comany, New York, 952. 4

[2] Ginsberg, B. D., Midy s (nearly) secret theorem an extension after 65 years, College Mathematics Journal, Vol. 35, 26-30, 2004. [3] Guta, A. and B. Sury, Decimal Exansion of / and Subgrou Sums, Integers, Vol. 5, Article A-9, -5, 2005. [4] Honsberger, R., Ingenuity in Mathematics, Random House/Singer, New Mathematical Library, 970. [5] Hardy, G. H. and Wright, E. M., An Introduction to the Theory of Numbers, Fifth Corrected Edition, Oxford University Press, 988. [6] Leavitt, W. G., A Theorem on Reeating Decimals, American Mathematical Monthly, Vol. 74, 669-673, 967. [7] Lewittes, J., Midy s Theorem for Periodic Decimals, Integers, Vol. 7, Article A-2, -, 2007. [8] Martin, H. W., Generalizations of Midy s Theorem on Reeating Decimals, Integers, Vol. 7, Article A-3, -7, 2007. [9] Midy, E., De Quelques Prorietes des Nombres et des Fractions Decimales Periodiques, Nantes, 836. [0] Rademacher, H. and Toelitz, O., The Enjoyment of Mathematics, Dover Publications, 990. [] Shrader-Frechette, M., Comlementary Rational Numbers, Mathematics Magazine, Vol. 5, 90-98, 978. About the author: I enjoy lecturing on mathematical toics that are not routine, in articular mathematical roblem solving. Outside of mathematics, I enjoy laying table tennis, working on crosswords and sudoku, listening to music, and when given an oortunity, to demonstrate my comutational abilities. Amitabha Triathi Deartment of Mathematics, Indian Institute of Technology, Hauz Khas, New Delhi 006. atriath@maths.iitd.ac.in 5