.

Monday, February 25, 2019

The Higher Arithmetic – an Introduction to the Theory of Numbers

This page intention whollyy left blank promptly into its eighth edition and with auxiliaryal satisfying on primality testing, create verb al integrityy by J. H. Davenport, The higher(prenominal) Arithmetic introduces concepts and theorems in a chatterive style that does non necessitate the reader to restrain an in-depth k straighta behaviorledge of the surmisal of subroutines but alike touches upon matters of deep mathematical signi? mintce. A companion website (www. cambridge. org/davenport) provides more details of the a la mode(p) advances and sample code for definitive algorithms. Reviews of earlier editions . . . the well- live onn and enchanting submission to turning theory . . loafer be recommended both(prenominal)(prenominal) for in hooklike piece of formulate and as a reference text for a familiar mathematical audience. European Maths Society Journal Although this book is non written as a textbook but rather as a work for the ordinary reader, it could acceptedly be employ as a textbook for an undergraduate course in teleph whizz cast theory and, in the reviewers opinion, is far superior for this purpose to whatso invariably opposite book in English. Bulletin of the Ameri stub Mathematical Society THE high ARITHMETIC AN INTRODUCTION TO THE THEORY OF NUMBERS Eighth edition H. Davenport M. A. , SC. D. F. R. S. fresh Rouse B all prof of Mathematics in the University of Cambridge and Fellow of viridity chord College Editing and additional material by James H. Davenport CAMBRIDGE UNIVERSITY PRESS Cambridge, spick-and-span York, Melbourne, Madrid, Cape Town, Singapore, Sao Paulo Cambridge University examine The Edinburgh Building, Cambridge CB2 8RU, UK Published in the United States of America by Cambridge University Press, newfound York www. cambridge. org In tieration on this title www. cambridge. org/9780521722360 The estate of H. Davenport 2008 This publication is in copyright.Subject to statutory exception a nd to the provision of relevant collective licensing agreements, no retort of nearly(prenominal) realm may take place without the written consent of Cambridge University Press. First published in print format 2008 ISBN-13 ISBN-13 978-0-511-45555-1 978-0-521-72236-0 eBook (EBL) paperback Cambridge University Press has no responsibility for the persistence or accuracy of urls for external or third-party internet websites referred to in this publication, and does non guarantee that either content on such websites is, or leave behind remain, accurate or appropriate. CONTENTS excogitation I geneing and the pristines 1. 2. 3. 4. . 6. 7. 8. 9. 10. The laws of arithmetical Proof by induction pristine metrical composition The unplumbed theorem of arithmetic Consequences of the central theorem Euclids algorithm hardly a(prenominal) new(prenominal) induction of the fundamental theorem A retention of the H. C. F Factorizing a anatomy The serial publication of blushs pag e viii 1 1 6 8 9 12 16 18 19 22 25 31 31 33 35 37 40 41 42 45 46 II Congruences 1. 2. 3. 4. 5. 6. 7. 8. 9. The congruousness promissory note elongate congruousnesss Fermats theorem Eulers flow ? (m) Wilsons theorem Algebraic congruences Congruences to a skin rash(a) modulus Congruences in several unknowns Congruences covering solely rime v vi III Quadratic Residues 1. 2. 3. 4. . 6. Primitive roots Indices Quadratic residues Gausss flowering glume The law of reciprocity The statistical distribution of the quadratic residues Contents 49 49 53 55 58 59 63 68 68 70 72 74 77 78 82 83 86 92 94 99 103 103 104 108 111 114 116 116 117 120 122 124 126 128 131 133 IV act Fractions 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Introduction The general continued cypher Eulers rule The convergents to a continued fraction The comp ar ax ? by = 1 In? nite continued fractions Diophantine approximation Quadratic irrationals Purely periodic continued fractions Lagranges theorem Pells comparabil ity A geometrical interpreting of continued fractionsV Sums of Squargons 1. 2. 3. 4. 5. become consistable by deuce squ ars Primes of the form 4k + 1 Constructions for x and y Representation by four squargons Representation by 3 squargons VI Quadratic breeds 1. 2. 3. 4. 5. 6. 7. 8. 9. Introduction Equivalent forms The discriminant The representation of a upshot by a form Three utilisations The reduction of positive de? nite forms The reduced forms The way out of representations The class- scrap Contents VII Some Diophantine Equations 1. Introduction 2. The equivalence x 2 + y 2 = z 2 3. The par ax 2 + by 2 = z 2 4. Elliptic comparisons and curves 5.Elliptic equations modulo eyeshades 6. Fermats closing curtain Theorem 7. The equation x 3 + y 3 = z 3 + w 3 8. Further developments vii 137 137 138 140 145 151 154 157 159 mavin hundred sixty-five 165 168 173 179 185 188 194 199 200 209 222 225 235 237 VIII Computers and Number Theory 1. 2. 3. 4. 5. 6. 7. 8. 9. Introducti on testing for primality Random depend generators Pollards movering exclusivelyeges Factoring and primality via oviform curves Factoring braggy rate The Dif? eHellman cryptanalytic method The RSA cryptographic method Primality testing revisited Exercises Hints Answers Bibliography IndexINTRODUCTION The high(prenominal)(prenominal) arithmetic, or the theory of deems, is concerned with the properties of the indwelling chassiss 1, 2, 3, . . . . These procedures moldiness urinate exercised human curiosity from a very(prenominal) some other(prenominal)(a) period and in completely(prenominal)(prenominal) the records of ancient civilizations in that location is license of some preoccupation with arithmetic over and above the demand of all(prenominal)day life. But as a systematic and in parasitical science, the higher arithmetic is entirely a creation of modern times, and so-and-so be state to date from the discoveries of Fermat (16011665).A peculiarity of the higher arithmetic is the great dif? culty which has frequently been experienced in proving unreserved general theorems which had been suggested quite a ingrainedly by quantitative evidence. It is scarcely this, said Gauss, which unwraps the higher arithmetic that magical charm which has do it the favourite science of the greatest mathematicians, not to commendation its limitless(prenominal) wealth, wherein it so greatly surpasses other parts of mathematics. The theory of bes is by and large considered to be the purest branch of pure mathematics.It certainly has very few bring applications to other sciences, but it has whiz feature in vulgar with them, videlicet the inspiration which it derives from experiment, which takes the form of testing come-at-able general theorems by quantitative examples. Such experiment, though necessary in some form to furtherance in each part of mathematics, has played a greater part in the development of the theory of issue forths than elsewhere for in other branches of mathematics the evidence pitch in this way is too often fragmentary and misleading.As regards the present book, the author is well aw atomic number 18 that it allow not be read without effort by those who be not, in some sense at to the lowest degree, mathematicians. But the dif? culty is partly that of the subject itself. It cannot be evaded by using broken analogies, or by presenting the conclusions in a way viii Introduction ix which may convey the main cerebration of the lineage, but is inaccurate in detail. The theory of numbers is by its personality the intimately exact of all the sciences, and demands exactness of thought and exposition from its devotees. The theorems and their checks atomic number 18 often adornd by numerical examples.These be generally of a very unanalyzable kind, and may be despised by those who enjoy numerical calculation. But the function of these examples is solely to illustrate the general theor y, and the examination of how arithmetic calculations can most effectively be carried out is beyond the backdrop of this book. The author is indebted to umpteen friends, and most of all to Professor o Erd? s, Professor Mordell and Professor Rogers, for suggestions and corrections. He is alike indebted to overlord Draim for authorization to include an calculate of his algorithm.The material for the ? fth edition was prep atomic number 18d by Professor D. J. Lewis and Dr J. H. Davenport. The conundrums and answers argon based on the suggestions of Professor R. K. Guy. Chapter VIII and the associated exercises were written for the sixth edition by Professor J. H. Davenport. For the seventh edition, he updated Chapter VII to mention Wiles evidence of Fermats Last Theorem, and is grateful to Professor J. H. Silverman for his comments. For the eighth edition, some people contributed suggestions, notably Dr J. F. McKee and Dr G. K. Sankaran.Cambridge University Press kindly re-t ype fate the book for the eighth edition, which has allowed a few corrections and the preparation of an electronic complement www. cambridge. org/davenport. References to further material in the electronic complement, when known at the time this book went to print, be marked thus 0. I FACTORIZATION AND THE PRIMES 1. The laws of arithmetic The object of the higher arithmetic is to discover and to establish general propositions concerning the native numbers 1, 2, 3, . . . of public arithmetic. Examples of such propositions ar the fundamental theorem (I. 4)? hat both innate(p) number can be solved into gear up numbers in sensation and sole(prenominal) unmatched way, and Lagranges theorem (V. 4) that both inborn number can be delivered as a centre of maintenance of four or less perfect squ bes. We ar not concerned with numerical calculations, except as illustrative examples, nor be we much concerned with numerical curiosities except where they argon relevant to gener al propositions. We learn arithmetic experimentally in premature childhood by playing with objects such as beads or marbles. We ? rst learn addition by combining both fixeds of objects into a genius organise, and subsequent we learn multiplication, in the form of repeated addition.Gradually we learn how to foretell with numbers, and we become familiar with the laws of arithmetic laws which probably carry more condemnation to our minds than either(prenominal) other propositions in the whole range of human knowledge. The higher arithmetic is a deductive science, based on the laws of arithmetic which we all know, though we may never nurture pay heedn them formulated in general m startary value. They can be expressed as follows. ? References in this form be to chapters and sections of chapters of this book. 1 2 The Higher Arithmetic Addition. all deuce natural numbers a and b bemuse a meatmate, denoted by a + b, which is itself a natural number. The operation of additi on satis? es the ii laws a+b =b+a (commutative law of addition), (associative law of addition), a + (b + c) = (a + b) + c the brackets in the bear formula serving to allude the way in which the operations are carried out. Multiplication. Any dickens natural numbers a and b live a harvest-time, denoted by a ? b or ab, which is itself a natural number. The operation of multiplication satis? es the deuce laws ab = ba a(bc) = (ab)c (commutative law of multiplication), (associative law of multiplication). in that respect is as well a law which involves operations both of addition and of multiplication a(b + c) = ab + ac (the distributive law). Order. If a and b are whatsoever(prenominal) both natural numbers, at that placeforece either a is exist to b or a is less than b or b is less than a, and of these three possibilities scarce 1 essential occur. The bid that a is less than b is expressed symbolically by a b, and when this is the theme we also articulate that b is greater than a, expressed by b a. The fundamental law governing this notion of order is that if a b. We propose to investigate the commonalty computes of a and b.If a is dissociable by b, consequently the common divisors of a and b lie down s require of all divisors of b, and there is no more to be said. If a is not cleavable by b, we can express a as a six-fold of b to occurher with a dispute less than b, that is a = qb + c, where c b. (2) This is the process of variance with a remainder, and expresses the particular that a, not world a duple of b, must occur somewhere between devil consecutive quadruplexs of b. If a comes between qb and (q + 1)b, then a = qb + c, where 0 c b. It follows from the equation (2) that any common divisor of b and c is also a divisor of a.Moreover, any common divisor of a and b is also a divisor of c, since c = a ? qb. It follows that the common divisors of a and b, whatever they may be, are the eq as the common divisors of b and c. The problem of ? nding the common divisors of a and b is reduced to the same problem for the numbers b and c, which are respectively less than a and b. The ticker of the algorithm lies in the repetition of this lean. If b is partible by c, the common divisors of b and c live of all divisors of c. If not, we express b as b = r c + d, where d c. (3)Again, the common divisors of b and c are the same as those of c and d. The process goes on until it terminates, and this can provided happen when exact divisibility occurs, that is, when we come to a number in the sequence a, b, c, . . . , which is a divisor of the preceding number. It is plain that the process must terminate, for the decreasing sequence a, b, c, . . . of natural numbers cannot go on for ever. fixingsing and the Primes 17 permit us bet, for the sake of de? niteness, that the process terminates when we r distributively the number h, which is a divisor of the preceding number g.Then the expire both equations of the serial publication (2), (3), . . . are f = vg + h, g = wh. (4) (5) The common divisors of a and b are the same as those of b and c, or of c and d, and so on until we reach g and h. Since h divides g, the common divisors of g and h consist simply of all divisors of h. The number h can be identi? ed as be the cash in unitarys chips remainder in Euclids algorithm before exact divisibility occurs, i. e. the last non- postcode remainder. We choose because be that the common divisors of two disposed(p) natural numbers a and b consist of all divisors of a certain number h (the H. C. F. f a and b), and this number is the last non- vigor remainder when Euclids algorithm is applied to a and b. As a numerical illustration, take the numbers 3132 and 7200 which were used in 5. The algorithm runs as follows 7200 = 2 ? 3132 + 936, 3132 = 3 ? 936 + 324, 936 = 2 ? 324 + 288, 324 = 1 ? 288 + 36, 288 = 8 ? 36 and the H. C. F. is 36, the last remainder. It is often possible to shorten the working a little by using a negative remainder whenever this is numerically less than the corresponding positive remainder. In the above example, the last three stairs could be replaced by 936 = 3 ? 324 ? 6, 324 = 9 ? 36. The reason why it is permissible to use negative remainders is that the product line that was applied to the equation (2) would be equally valid if that equation were a = qb ? c instead of a = qb + c. Two numbers are said to be comparatively blossoming? if they go for no common divisor except 1, or in other words if their H. C. F. is 1. This will be the case if and still if the last remainder, when Euclids algorithm is applied to the two numbers, is 1. ? This is, of course, the same de? nition as in 5, but is repeated here because the present treatment is in babelike of that give previous(prenominal)ly. 8 7. Another proofread of the fundamental theorem The Higher Arithmetic We shall now use Euclids algorithm to give another proof of the fundamental theorem of arithmetic, independent of that condition up in 4. We begin with a very simple remark, which may be thought to be too open-and-shut to be worth making. allow a, b, n be any natural numbers. The highest common fixings of na and nb is n times the highest common factor of a and b. However obvious this may seem, the reader will ? nd that it is not easy to give a proof of it without using either Euclids algorithm or the fundamental theorem of arithmetic.In fact the head follows at once from Euclids algorithm. We can suppose a b. If we divide na by nb, the quotient is the same as before (namely q) and the remainder is nc instead of c. The equation (2) is replaced by na = q. nb + nc. The same applies to the later equations they are all simply figure throughout by n. Finally, the last remainder, giving the H. C. F. of na and nb, is nh, where h is the H. C. F. of a and b. We apply this simple fact to stand up the pursual theorem, often called Euclids theorem, since it occurs as P rop. 30 of Book VII.If a indigenous divides the product of two numbers, it must divide one of the numbers (or maybe both of them). Suppose the prime p divides the product na of two numbers, and does not divide a. The merely factors of p are 1 and p, and therefore the only common factor of p and a is 1. then, by the theorem scantily proven, the H. C. F. of np and na is n. Now p divides np obviously, and divides na by hypothesis. indeed p is a common factor of np and na, and so is a factor of n, since we know that every(prenominal) common factor of two numbers is necessarily a factor of their H. C. F.We have therefore be that if p divides na, and does not divide a, it must divide n and this is Euclids theorem. The uniqueness of factorization into primes now follows. For suppose a number n has two factorizations, say n = pqr . . . = p q r . . . , where all the numbers p, q, r, . . . , p , q , r , . . . are primes. Since p divides the product p (q r . . . ) it must divide eithe r p or q r . . . . If p divides p then p = p since both numbers are primes. If p divides q r . . . we repeat the argument, and ultimately reach the conclusion that p must equal one of the primes p , q , r , . . . We can edit the common prime p from the two representations, and start again with one of those left, say q. Eventually it follows that all the primes on the left are the same as those on the right, and the two representations are the same. Factorization and the Primes 19 This is the selection proof of the uniqueness of factorization into primes, which was referred to in 4. It has the merit of resting on a general theory (that of Euclids algorithm) rather than on a peculiar(prenominal) device such as that used in 4. On the other hand, it is longer and less trail. 8. A property of the H. C.F From Euclids algorithm one can deduce a remarkable property of the H. C. F. , which is not at all apparent from the original construction for the H. C. F. by factorization into primes (5). The property is that the highest common factor h of two natural numbers a and b is representable as the exit between a doubled of a and a fivefold of b, that is h = ax ? by where x and y are natural numbers. Since a and b are both multiples of h, any number of the form ax ? by is necessarily a multiple of h and what the result asserts is that there are some doctor of x and y for which ax ? y is actually equal to h. in the lead giving the proof, it is convenient to note some properties of numbers representable as ax ? by. In the ? rst place, a number so representable can also be delineated as by ? ax , where x and y are natural numbers. For the two expressions will be equal if a(x + x ) = b(y + y ) and this can be ensured by taking any number m and de? ning x and y by x + x = mb, y + y = ma. These numbers x and y will be natural numbers provided m is suf? ciently large, so that mb x and ma y. If x and y are de? ned in this way, then ax ? by = by ? x . We say that a num ber is elongately dependent on a and b if it is representable as ax ? by. The result just proved shows that linear dependence on a and b is not affected by interchanging a and b. There are two further simple facts about linear dependence. If a number is linearly dependent on a and b, then so is any multiple of that number, for k(ax ? by) = a. kx ? b. ky. Also the sum of two numbers that are each linearly dependent on a and b is itself linearly dependent on a and b, since (ax1 ? by1 ) + (ax2 ? by2 ) = a(x1 + x2 ) ? b(y1 + y2 ). 20 The Higher ArithmeticThe same applies to the take issueence of two numbers to see this, write the second number as by2 ? ax2 , in conformation with the earlier remark, before subtracting it. Then we get (ax1 ? by1 ) ? (by2 ? ax2 ) = a(x1 + x2 ) ? b(y1 + y2 ). So the property of linear dependence on a and b is preserved by addition and subtraction, and by multiplication by any number. We now examine the steps in Euclids algorithm, in the light of this co ncept. The numbers a and b themselves are certainly linearly dependent on a and b, since a = a(b + 1) ? b(a), b = a(b) ? b(a ? 1). The ? rst equation of the algorithm was a = qb + c.Since b is linearly dependent on a and b, so is qb, and since a is also linearly dependent on a and b, so is a ? qb, that is c. Now the nigh equation of the algorithm allows us to deduce in the same way that d is linearly dependent on a and b, and so on until we come to the last remainder, which is h. This proves that h is linearly dependent on a and b, as asserted. As an illustration, take the same example as was used in 6, namely a = 7200 and b = 3132. We work through the equations one at a time, using them to express each remainder in terms of a and b. The ? rst equation was 7200 = 2 ? 3132 + 936, which tells s that 936 = a ? 2b. The second equation was 3132 = 3 ? 936 + 324, which gives 324 = b ? 3(a ? 2b) = 7b ? 3a. The third equation was 936 = 2 ? 324 + 288, which gives 288 = (a ? 2b) ? 2(7b ? 3a) = 7a ? 16b. The fourth equation was 324 = 1 ? 288 + 36, Factorization and the Primes which gives 36 = (7b ? 3a) ? (7a ? 16b) = 23b ? 10a. 21 This expresses the highest common factor, 36, as the take issueence of two multiples of the numbers a and b. If one prefers an expression in which the multiple of a comes ? rst, this can be obtained by arguing that 23b ? 10a = (M ? 10)a ? (N ? 23)b, provided that Ma = N b.Since a and b have the common factor 36, this factor can be removed from both of them, and the condition on M and N becomes 200M = 87N . The simplest choice for M and N is M = 87, N = 200, which on reversal gives 36 = 77a ? 177b. Returning to the general theory, we can express the result in another form. Suppose a, b, n are disposed(p) natural numbers, and it is coveted to ? nd natural numbers x and y such that ax ? by = n. (6) Such an equation is called an indeterminate equation since it does not determine x and y work outly, or a Diophantine equation after Diophantus of Alexandria (third coulomb A . D . , who wrote a famous treatise on arithmetic. The equation (6) cannot be alcohol- alcohol-soluble unless n is a multiple of the highest common factor h of a and b for this highest common factor divides ax ? by, whatever set x and y may have. Now suppose that n is a multiple of h, say, n = mh. Then we can solve the equation for all we have to do is ? rst solve the equation ax1 ? by1 = h, as we have seen how to do above, and then multiply throughout by m, getting the solution x = mx1 , y = my1 for the equation (6). Hence the linear indeterminate equation (6) is soluble in natural numbers x, y if and only if n is a multiple of h.In particular, if a and b are comparatively prime, so that h = 1, the equation is soluble whatever value n may have. As regards the linear indeterminate equation ax + by = n, we have found the condition for it to be soluble, not in natural numbers, but in integers of opposite signs one positive and one negative. The questio n of when this equation is soluble in natural numbers is a more dif? cult one, and one that cannot well be completely answered in any simple way. sure enough 22 The Higher Arithmetic n must be a multiple of h, but also n must not be too small in relation to a and b.It can be proved quite slowly that the equation is soluble in natural numbers if n is a multiple of h and n ab. 9. Factorizing a number The obvious way of factorizing a number is to test whether it is divisible by 2 or by 3 or by 5, and so on, using the series of primes. If a number N v is not divisible by any prime up to N , it must be itself a prime for any composite number has at least two prime factors, and they cannot both be v greater than N . The process is a very laborious one if the number is at all large, and for this reason factor tables have been computed.The most extensive one which is generally accessible is that of D. N. Lehmer (Carnegie Institute, Washington, Pub. No. 105. 1909 reprinted by Hafner Press , naked as a jaybird York, 1956), which gives the least prime factor of each number up to 10,000,000. When the least prime factor of a particular number is known, this can be split out, and repetition of the process gives eventually the complete factorization of the number into primes. Several mathematicians, among them Fermat and Gauss, have invented methods for reducing the amount of trial that is necessary to factorize a large number.Most of these involve more knowledge of number-theory than we can consume at this stage but there is one method of Fermat which is in principle extremely simple and can be explained in a few words. Let N be the abandoned number, and let m be the least number for which m 2 N . Form the numbers m 2 ? N , (m + 1)2 ? N , (m + 2)2 ? N , . . . . (7) When one of these is reached which is a perfect square, we get x 2 ? N = y 2 , and consequently N = x 2 ? y 2 = (x ? y)(x + y). The calculation of the numbers (7) is facilitated by noting that their seque nt resistences increase at a constant rate. The identi? ation of one of them as a perfect square is most easily do by using Barlows Table of Squares. The method is particularly successful if the number N has a factorization in which the two factors are of about the same magnitude, since then y is small. If N is itself a prime, the process goes on until we reach the solution provided by x + y = N , x ? y = 1. As an illustration, take N = 9271. This comes between 962 and 972 , so that m = 97. The ? rst number in the series (7) is 972 ? 9271 = 138. The Factorization and the Primes 23 subsequent ones are obtained by adding successively 2m + 1, then 2m + 3, and so on, that is, 195, 197, and so on.This gives the series 138, 333, 530, 729, 930, . . . . The fourth of these is a perfect square, namely 272 , and we get 9271 = 1002 ? 272 = 127 ? 73. An interesting algorithm for factorization has been discovered recently by Captain N. A. Draim, U . S . N. In this, the result of each trial div ision is used to vary the number in preparation for the next division. There are several forms of the algorithm, but perhaps the simplest is that in which the successive divisors are the mirthful numbers 3, 5, 7, 9, . . . , whether prime or not. To explain the rules, we work a numerical example, say N = 4511. The ? st step is to divide by 3, the quotient being 1503 and the remainder 2 4511 = 3 ? 1503 + 2. The next step is to subtract doubly the quotient from the given number, and then add the remainder 4511 ? 2 ? 1503 = 1505, 1505 + 2 = 1507. The last number is the one which is to be carve up by the next odd number, 5 1507 = 5 ? 301 + 2. The next step is to subtract twice the quotient from the ? rst derived number on the previous line (1505 in this case), and then add the remainder from the last line 1505 ? 2 ? 301 = 903, 903 + 2 = 905. This is the number which is to be divided by the next odd number, 7. Now we an continue in just the same way, and no further explanation will be necessitate 905 = 7 ? 129 + 2, 903 ? 2 ? 129 = 645, 645 ? 2 ? 71 = 503, 503 ? 2 ? 46 = 411, 645 + 2 = 647, 503 + 8 = 511, 411 + 5 = 416, 647 = 9 ? 71 + 8, 511 = 11 ? 46 + 5, 416 = 13 ? 32 + 0. 24 The Higher Arithmetic We have reached a zero remainder, and the algorithm tells us that 13 is a factor of the given number 4511. The complementary factor is found by carrying out the ? rst half of the next step 411 ? 2 ? 32 = 347. In fact 4511 = 13? 347, and as 347 is a prime the factorization is complete. To justify the algorithm generally is a matter of mere(a) algebra.Let N1 be the given number the ? rst step was to express N1 as N1 = 3q1 + r1 . The next step was to form the numbers M2 = N1 ? 2q1 , The number N2 was divided by 5 N2 = 5q2 + r2 , and the next step was to form the numbers M3 = M2 ? 2q2 , N 3 = M3 + r 2 , N 2 = M2 + r 1 . and so the process was continued. It can be deduced from these equations that N2 = 2N1 ? 5q1 , N3 = 3N1 ? 7q1 ? 7q2 , N4 = 4N1 ? 9q1 ? 9q2 ? 9q3 , and s o on. Hence N2 is divisible by 5 if and only if 2N1 is divisible by 5, or N1 divisible by 5. Again, N3 is divisible by 7 if and only if 3N1 is divisible by 7, or N1 divisible by 7, and so on.When we reach as divisor the least prime factor of N1 , exact divisibility occurs and there is a zero remainder. The general equation analogous to those given above is Nn = n N1 ? (2n + 1)(q1 + q2 + + qn? 1 ). The general equation for Mn is found to be Mn = N1 ? 2(q1 + q2 + + qn? 1 ). (9) If 2n + 1 is a factor of the given number N1 , then Nn is scarce divisible by 2n + 1, and Nn = (2n + 1)qn , whence n N1 = (2n + 1)(q1 + q2 + + qn ), (8) Factorization and the Primes by (8). below these circumstances, we have, by (9), Mn+1 = N1 ? 2(q1 + q2 + + qn ) = N1 ? 2 n 2n + 1 N1 = N1 . n + 1 25 Thus the complementary factor to the factor 2n + 1 is Mn+1 , as stated in the example. In the numerical example worked out above, the numbers N1 , N2 , . . . decrease steadily. This is always the case at the beginning of the algorithm, but may not be so later. However, it appears that the later numbers are always considerably less than the original number. 10. The series of primes Although the notion of a prime is a very natural and obvious one, questions concerning the primes are often very dif? cult, and galore(postnominal) such questions are quite unanswerable in the present state of mathematical knowledge.We conclude this chapter by mentioning brie? y some results and conjectures about the primes. In 3 we gave Euclids proof that there are in? nitely numerous primes. The same argument will also serve to prove that there are in? nitely umteen primes of certain speci? ed forms. Since every prime after 2 is odd, each of them falls into one of the two betterments (a) 1, 5, 9, 13, 17, 21, 25, . . . , (b) 3, 7, 11, 15, 19, 23, 27, . . . the progression (a) consisting of all numbers of the form 4x + 1, and the progression (b) of all numbers of the form 4x ? 1 (or 4x + 3, which comes to the same thing).We ? rst prove that there are in? nitely umpteen another(prenominal) primes in the progression (b). Let the primes in (b) be enumerated as q1 , q2 , . . . , beginning with q1 = 3. Consider the number N de? ned by N = 4(q1 q2 . . . qn ) ? 1. This is itself a number of the form 4x ? 1. Not every prime factor of N can be of the form 4x + 1, because any product of numbers which are all of the form 4x + 1 is itself of that form, e. g. (4x + 1)(4y + 1) = 4(4x y + x + y) + 1. Hence the number N has some prime factor of the form 4x ? 1. This cannot be any of the primes q1 , q2 , . . . , qn , since N leaves the remainder ? when 26 The Higher Arithmetic divided by any of them. Thus there exists a prime in the series (b) which is several(predicate) from any of q1 , q2 , . . . , qn and this proves the proposition. The same argument cannot be used to prove that there are in? nitely many primes in the series (a), because if we construct a number of the form 4x +1 it d oes not follow that this number will necessarily have a prime factor of that form. However, another argument can be used. Let the primes in the series (a) be enumerated as r1 , r2 , . . . , and consider the number M de? ned by M = (r1 r2 . . rn )2 + 1. We shall see later (III. 3) that any number of the form a 2 + 1 has a prime factor of the form 4x + 1, and is indeed entirely composed of such primes, together possibly with the prime 2. Since M is obviously not divisible by any of the primes r1 , r2 , . . . , rn , it follows as before that there are in? nitely many primes in the progression (a). A similar bureau arises with the two progressions 6x + 1 and 6x ? 1. These progressions exhaust all numbers that are not divisible by 2 or 3, and therefore every prime after 3 falls in one of these two progressions.One can prove by methods similar to those used above that there are in? nitely many primes in each of them. But such methods cannot cope with the general arithmetical progression. Such a progression consists of all numbers ax +b, where a and b are ? xed and x = 0, 1, 2, . . . , that is, the numbers b, b + a, b + 2a, . . . . If a and b have a common factor, every number of the progression has this factor, and so is not a prime (apart from possibly the ? rst number b). We must therefore suppose that a and b are relatively prime. It then seems plausible that the progression will contain in? itely many primes, i. e. that if a and b are relatively prime, there are in? nitely many primes of the form ax + b. Legendre seems to have been the ? rst to realize the importance of this proposition. At one time he thought he had a proof, but this dour out to be fallacious. The ? rst proof was given by Dirichlet in an important memoir which appeared in 1837. This proof used analytical methods (functions of a consecutive variable, limits, and in? nite series), and was the ? rst rightfully important application of such methods to the theory of numbers.It open(a) up com pletely new lines of development the ideas underlying Dirichlets argument are of a very general character and have been fundamental for much subsequent work applying analytical methods to the theory of numbers. Factorization and the Primes 27 Not much is known about other forms which represent in? nitely many primes. It is conjectured, for instance, that there are in? nitely many primes of the form x 2 + 1, the ? rst few being 2, 5, 17, 37, 101, 197, 257, . . . . But not the slightest progress has been made towards proving this, and the question seems hopelessly dif? cult.Dirichlet did succeed, however, in proving that any quadratic form in two variables, that is, any form ax 2 + bx y + cy 2 , in which a, b, c are relatively prime, represents in? nitely many primes. A question which has been deeply investigated in modern times is that of the frequency of event of the primes, in other words the question of how many primes there are among the numbers 1, 2, . . . , X when X is large. This number, which depends of course on X , is normally denoted by ? (X ). The ? rst conjecture about the magnitude of ? (X ) as a function of X seems to have been made independently by Legendre and Gauss about X 1800.It was that ? (X ) is approximately log X . Here log X denotes the natural (so-called Napierian) logarithm of X , that is, the logarithm of X to the base e. The conjecture seems to have been based on numerical evidence. For example, when X is 1,000,000 it is found that ? (1,000,000) = 78,498, whereas the value of X/ log X (to the nearest integer) is 72,382, the ratio being 1. 084 . . . . Numerical evidence of this kind may, of course, be quite misleading. But here the result suggested is true, in the sense that the ratio of ? (X ) to X/ log X tends to the limit 1 as X tends to in? ity. This is the famous Prime Number Theorem, ? rst proved by Hadamard and de la Vall? e e Poussin independently in 1896, by the use of new and powerful analytical methods. It is impossible t o give an account here of the many other results which have been proved concerning the distribution of the primes. Those proved in the nineteenth century were mostly in the nature of imperfect approaches towards the Prime Number Theorem those of the twentieth century included confused re? nements of that theorem. There is one recent event to which, however, reference should be made.We have already said that the proof of Dirichlets Theorem on primes in arithmetical progressions and the proof of the Prime Number Theorem were analytical, and made use of methods which cannot be said to belong properly to the theory of numbers. The propositions themselves relate entirely to the natural numbers, and it seems tenable that they should be provable without the intervention of such foreign ideas. The search for elementary proofs of these two theorems was unsuccessful until fairly recently. In 1948 A. Selberg found the ? rst elementary proof of Dirichlets Theorem, and with 28 The Higher Arith metic he help of P. Erd? s he found the ? rst elementary proof of the Prime Numo ber Theorem. An elementary proof, in this connection, authority a proof which operates only with natural numbers. Such a proof is not necessarily simple, and indeed both the proofs in question are distinctly dif? cult. Finally, we may mention the famous problem concerning primes which was propounded by Goldbach in a letter to Euler in 1742. Goldbach suggested (in a slightly different wording) that every even number from 6 onwards is representable as the sum of two primes other than 2, e. g. 6 = 3 + 3, 8 = 3 + 5, 10 = 3 + 7 = 5 + 5, 12 = 5 + 7, . . . Any problem like this which relates to additive properties of primes is necessarily dif? cult, since the de? nition of a prime and the natural properties of primes are all expressed in terms of multiplication. An important donation to the subject was made by Hardy and Littlewood in 1923, but it was not until 1930 that anything was rigorously proved that co uld be considered as even a irrelevant approach towards a solution of Goldbachs problem. In that year the Russian mathematician Schnirelmann proved that there is some number N such that every number from some point onwards is representable as the sum of at most N primes.A much nearer approach was made by Vinogradov in 1937. He proved, by analytical methods of extreme subtlety, that every odd number from some point onwards is representable as the sum of three primes. This was the starting point of much new work on the additive theory of primes, in the course of which many problems have been solved which would have been quite beyond the scope of any pre-Vinogradov methods. A recent result in connection with Goldbachs problem is that every suf? ciently large even number is representable as the sum of two numbers, one of which is a prime and the other of which has at most two prime factors.Notes Where material is changing more rapidly than print cycles permit, we have chosen to place s ome of the material on the books website www. cambridge. org/davenport. Symbols such as I0 are used to indicate where there is such additional material. 1. The main dif? culty in giving any account of the laws of arithmetic, such as that given here, lies in deciding which of the various concepts should come ? rst. There are several possible arrangements, and it seems to be a matter of taste which one prefers. It is no part of our purpose to contemplate further the concepts and laws of ? rithmetic. We take the commonsense (or na? ve) view that we all know Factorization and the Primes 29 the natural numbers, and are satis? ed of the validity of the laws of arithmetic and of the principle of induction. The reader who is interested in the foundations of mathematics may mention Bertrand Russell, Introduction to Mathematical Philosophy (Allen and Unwin, London), or M. Black, The Nature of Mathematics (Harcourt, Brace, New York). Russell de? nes the natural numbers by selecting them from numbers of a more general kind. These more general numbers are the (? ite or in? nite) central numbers, which are de? ned by means of the more general notions of class and one-to-one correspondence. The selection is made by de? ning the natural numbers as those which possess all the inductive properties. (Russell, loc. cit. , p. 27). But whether it is fairish to base the theory of the natural numbers on such a vague and dissatisfactory concept as that of a class is a matter of opinion. Dolus latet in universalibus as Dr Johnson remarked. 2. The objection to using the principle of induction as a de? ition of the natural numbers is that it involves references to any proposition about a natural number n. It seems plain the that propositions envisaged here must be statements which are signi? cant when made about natural numbers. It is not clear how this signi? cance can be tested or appreciated except by one who already knows the natural numbers. 4. I am not aware of having seen thi s proof of the uniqueness of prime factorization elsewhere, but it is unlikely that it is new. For other direct proofs, see Mathews, p. 2, or Hardy and Wright, p. 21.? 5. It has been shown by (intelligent computer searches that there is no odd perfect number less than 10300 . If an odd perfect number exists, it has at least eight distinct prime factors, of which the largest exceeds 108 . For references and other development on perfect or nearly perfect numbers, see Guy, sections A. 3, B. 1 and B. 2. I1 6. A critical reader may expose that in two places in this section I have used principles that were not explicitly stated in 1 and 2. In each place, a proof by induction could have been given, but to have done so would have distracted the readers attention from the main issues.The question of the length of Euclids algorithm is discussed in Uspensky and Heaslet, ch. 3, and D. E. Knuths The Art of Computer Programming vol. II Seminumerical Algorithms (Addison Wesley, Reading, Mass. , 3rd. ed. , 1998) section 4. 5. 3. 9. For an account of early methods of factoring, see Dicksons History Vol. I, ch. 14. For a discussion of the subject as it appeared in ? Particulars of books referred to by their authors names will be found in the Bibliography. 30 The Higher Arithmetic the 1970s see the article by Richard K. Guy, How to factor a number, Congressus Numerantium XVI Proc. th Manitoba Conf. Numer. Math. , Winnipeg, 1975, 4989, and at the turn of the millennium see Richard P. Brent, Recent progress and prospects for integer factorization algorithms, Springer Lecture Notes in Computer Science 1858 Proc. Computing and Combinatorics, 2000, 322. The subject is discussed further in Chapter VIII. It is doubtful whether D. N. Lehmers tables will ever be extended, since with them and a pocket calculator one can easily check whether a 12-digit number is a prime. Primality testing is discussed in VIII. 2 and VIII. 9. For Draims algorithm, see Mathematics Magazine, 25 (1952) 1914. 10. An excellent account of the distribution of primes is given by A. E. Ingham, The Distribution of Prime Numbers (Cambridge Tracts, no. 30, 1932 reprinted by Hafner Press, New York, 1971). For a more recent and extensive account see H. Davenport, Multiplicative Number Theory, 3rd. ed. (Springer, 2000). H. Iwaniec (Inventiones Math. 47 (1978) 17188) has shown that for in? nitely many n the number n 2 + 1 is either prime or the product of at most two primes, and indeed the same is true for any irreducible an 2 + bn + c with c odd. Dirichlets proof of his theorem (with a modi? ation due to Mertens) is given as an appendix to Dicksons Modern dim-witted Theory of Numbers. An elementary proof of the Prime Number Theorem is given in ch. 22 of Hardy and Wright. An elementary proof of the asymptotic formula for the number of primes in an arithmetic progression is given in Gelfond and Linnik, ch. 3. For a canvas of early work on Goldbachs problem, see James, Bull. American Math. Soc. , 5 5 (1949) 24660. It has been veri? ed that every even number from 6 to 4 ? 1014 is the sum of two primes, see Richstein, Math. Comp. , 70 (2001) 17459. For a proof of Chens theorem that every suf? iently large even integer can be represented as p + P2 , where p is a prime, and P2 is either a prime or the product of two primes, see ch. 11 of Sieve Methods by H. Halberstam and H. E. Richert (Academic Press, London, 1974). For a proof of Vinogradovs result, see T. Estermann, Introduction to Modern Prime Number Theory (Cambridge Tracts, no. 41, 1952) or H. Davenport, Multiplicative Number Theory, 3rd. ed. (Springer, 2000). Suf? ciently large in Vinogradovs result has now been quanti? ed as greater than 2 ? 101346 , see M. -C. Liu and T. Wang, Acta Arith. , 105 (2002) 133175.Conversely, we know that it is true up to 1. 13256 ? 1022 (Ramar? and Saouter in J. Number Theory 98 (2003) 1033). e II CONGRUENCES 1. The congruence notation It often happens that for the purposes of a particular cal culation, two numbers which differ by a multiple of some ? xed number are equivalent, in the sense that they produce the same result. For example, the value of (? 1)n depends only on whether n is odd or even, so that two determine of n which differ by a multiple of 2 give the same result. Or again, if we are concerned only with the last digit of a number, then for that purpose two umbers which differ by a multiple of 10 are effectively the same. The congruence notation, introduced by Gauss, serves to express in a convenient form the fact that two integers a and b differ by a multiple of a ? xed natural number m. We say that a is appropriate to b with respect to the modulus m, or, in symbols, a ? b (mod m). The meaning of this, then, is simply that a ? b is divisible by m. The notation facilitates calculations in which numbers differing by a multiple of m are effectively the same, by stressing the parity between congruence and equality.Congruence, in fact, means equality except fo r the addition of some multiple of m. A few examples of valid congruences are 63 ? 0 (mod 3), 7 ? ?1 (mod 8), 52 ? ?1 (mod 13). A congruence to the modulus 1 is always valid, whatever the two numbers may be, since every number is a multiple of 1. Two numbers are appropriate with respect to the modulus 2 if they are of the same parity, that is, both even or both odd. 31 32 The Higher Arithmetic Two congruences can be added, subtracted, or cipher together, in just the same way as two equations, provided all the congruences have the same modulus.If a ? ? (mod m) and b ? ? (mod m) then a + b ? ? + ? (mod m), a ? b ? ? ? ? (mod m), ab ? (mod m). The ? rst two of these statements are immediate for example (a + b) ? (? + ? ) is a multiple of m because a ? ? and b ? ? are both multiples of m. The third is not quite so immediate and is best proved in two steps. First ab ? ?b because ab ? ?b = (a ? ?)b, and a ? ? is a multiple of m. Next, ? b ? , for a similar reason. Hence ab ? (mod m). A congruence can always be multiplied throughout by any integer if a ? ? (mod m) then ka ? k? (mod m).Indeed this is a special case of the third result above, where b and ? are both k. But it is not always legitimate to cancel a factor from a congruence. For example 42 ? 12 (mod 10), but it is not permissible to cancel the factor 6 from the numbers 42 and 12, since this would give the false result 7 ? 2 (mod 10). The reason is obvious the ? rst congruence states that 42 ? 12 is a multiple of 10, but this does not imply that 1 (42 ? 12) is a multiple of 10. The cancellation of 6 a factor from a congruence is legitimate if the factor is relatively prime to the modulus.For let the given congruence be ax ? ay (mod m), where a is the factor to be cancelled, and we suppose that a is relatively prime to m. The congruence states that a(x ? y) is divisible by m, and it follows from the last proposition in I. 5 that x ? y is divisible by m. An illustration of the use of congruences is provid ed by the well-known rules for the divisibility of a number by 3 or 9 or 11. The usual representation of a number n by digits in the scale of 10 is really a representation of n in the form n = a + 10b + 100c + , where a, b, c, . . . re the digits of the number, read from right to left, so that a is the number of units, b the number of tens, and so on. Since 10 ? 1 (mod 9), we have also 102 ? 1 (mod 9), 103 ? 1 (mod 9), and so on. Hence it follows from the above representation of n that n ? a + b + c + (mod 9). Congruences 33 In other words, any number n differs from the sum of its digits by a multiple of 9, and in particular n is divisible by 9 if and only if the sum of its digits is divisible by 9. The same applies with 3 in place of 9 throughout. The rule for 11 is based on the fact that 10 ? ?1 (mod 11), so that 102 ? +1 (mod 11), 103 ? 1 (mod 11), and so on. Hence n ? a ? b + c ? (mod 11). It follows that n is divisible by 11 if and only if a ? b+c? is divisible by 1 1. For example, to test the divisibility of 9581 by 11 we form 1? 8+5? 9, or ? 11. Since this is divisible by 11, so is 9581. 2. Linear congruences It is obvious that every integer is congruous (mod m) to exactly one of the numbers 0, 1, 2, . . . , m ? 1. (1) r m, For we can express the integer in the form qm + r , where 0 and then it is congruent to r (mod m). Obviously there are other sets of numbers, besides the set (1), which have the same property, e. . any integer is congruent (mod 5) to exactly one of the numbers 0, 1, ? 1, 2, ? 2. Any such set of numbers is said to compose a complete set of residues to the modulus m. Another way of expressing the de? nition is to say that a complete set of residues (mod m) is any set of m numbers, no two of which are congruent to one another. A linear congruence, by analogy with a linear equation in elementary algebra, means a congruence of the form ax ? b (mod m). (2) It is an important fact that any such congruence is soluble for x, pro vided that a is relatively prime to m.The simplest way of proving this is to observe that if x runs through the numbers of a complete set of residues, then the corresponding value of ax also constitute a complete set of residues. For there are m of these numbers, and no two of them are congruent, since ax 1 ? ax2 (mod m) would involve x1 ? x2 (mod m), by the cancellation of the factor a (permissible since a is relatively prime to m). Since the numbers ax form a complete set of residues, there will be exactly one of them congruent to the given number b. As an example, consider the congruence 3x ? 5 (mod 11). 34 The Higher ArithmeticIf we give x the value 0, 1, 2, . . . , 10 (a complete set of residues to the modulus 11), 3x takes the determine 0, 3, 6, . . . , 30. These form another complete set of residues (mod 11), and in fact they are congruent respectively to 0, 3, 6, 9, 1, 4, 7, 10, 2, 5, 8. The value 5 occurs when x = 9, and so x = 9 is a solution of the congruence. Naturally any number congruent to 9 (mod 11) will also satisfy the congruence but nevertheless we say that the congruence has one solution, meaning that there is one solution in any complete set of residues. In other words, all solutions are mutually congruent.The same applies to the general congruence (2) such a congruence (provided a is relatively prime to m) is simply equivalent to the congruence x ? x0 (mod m), where x0 is one particular solution. There is another way of looking at the linear congruence (2). It is equivalent to the equation ax = b + my, or ax ? my = b. We proved in I. 8 that such a linear Diophantine equation is soluble for x and y if a and m are relatively prime, and that fact provides another proof of the solubility of the linear congruence. But the proof given above is simpler, and illustrates the advantages gained by using the congruence notation.The fact that the congruence (2) has a unique solution, in the sense explained above, suggests that one may use this solut ion as an interpretation b for the fraction a to the modulus m. When we do this, we obtain an arithmetic (mod m) in which addition, subtraction and multiplication are always possible, and division is also possible provided that the divisor is relatively prime to m. In this arithmetic there are only a ? nite number of essentially distinct numbers, namely m of them, since two numbers which are mutually congruent (mod m) are handle as the same.If we take the modulus m to be 11, as an illustration, a few examples of arithmetic mod 11 are 5 ? 9 ? ?2. 3 Any relation connecting integers or fractions in the ordinary sense be true when interpreted in this arithmetic. For example, the relation 5 + 7 ? 1, 5 ? 6 ? 8, 1 2 7 + = 2 3 6 becomes (mod 11) 6 + 8 ? 3, because the solution of 2x ? 1 is x ? 6, that of 3x ? 2 is x ? 8, and that of 6x ? 7 is x ? 3. Naturally the interpretation given to a fraction depends on the modulus, for instance 2 ? 8 (mod 11), but 2 ? 3 (mod 7). The 3 3 Congruences 35 nly limitation on such calculations is that just mentioned, namely that the denominator of any fraction must be relatively prime to the modulus. If the modulus is a prime (as in the above examples with 11), the limitation takes the very simple form that the denominator must not be congruent to 0 (mod m), and this is exactly analogous to the limitation in ordinary arithmetic that the denominator must not be equal to 0. We shall return to this point later (7). 3. Fermats theorem The fact that there are only a ? nite number of essentially different numbers in arithmetic to a modulus m means that there are algebraic relations which are satis? d by every number in that arithmetic. There is nothing analogous to these relations in ordinary arithmetic. Suppose we take any number x and consider its powers x, x 2 , x 3 , . . . . Since there are only a ? nite number of possibilities for these to the modulus m, we must eventually come to one which we have met before, say x h ? x k (mod m), w here k h. If x is relatively prime to m, the factor x k can be cancelled, and it follows that x l ? 1 (mod m), where l ? h ? k. Hence every number x which is relatively prime to m satis? es some congruence of this form. The least exponent l for which x l ? (mod m) will be called the order of x to the modulus m. If x is 1, its order is obviously 1. To illustrate the de? nition, let us calculate the orders of a few numbers to the modulus 11. The powers of 2, taken to the modulus 11, are 2, 4, 8, 5, 10, 9, 7, 3, 6, 1, 2, 4, . . . . Each one is twice the preceding one, with 11 or a multiple of 11 subtracted where necessary to make the result less than 11. The ? rst power of 2 which is ? 1 is 210 , and so the order of 2 (mod 11) is 10. As another example, take the powers of 3 3, 9, 5, 4, 1, 3, 9, . . . . The ? rst power of 3 which is ? 1 is 35 , so the order of 3 (mod 11) is 5.It will be found that the order of 4 is again 5, and so also is that of 5. It will be seen that the successive powers of x are periodic when we have reached the ? rst number l for which x l ? 1, then x l+1 ? x and the previous cycle is repeated. It is plain that x n ? 1 (mod m) if and only if n is a multiple of the order of x. In the last example, 3n ? 1 (mod 11) if and only if n is a multiple of 5. This remains valid if n is 0 (since 30 = 1), and it remains valid also for negative exponents, provided 3? n , or 1/3n , is interpreted as a fraction (mod 11) in the way explained in 2. 36 The Higher ArithmeticIn fact, the negative powers of 3 (mod 11) are obtained by prolonging the series backwards, and the table of powers of 3 to the modulus 11 is n = ?3 ? 2 ? 1 0 1 2 3 4 5 6 . . . 9 5 4 1 3 9 5 4 1 3 . 3n ? . . . Fermat discovered that if the modulus is a prime, say p, then every integer x not congruent to 0 satis? es x p? 1 ? 1 (mod p). (3) In view of what we have seen above, this is equivalent to saying that the order of any number is a divisor of p ? 1. The result (3) was mentioned by Fer mat in a letter to Fr? nicle de Bessy of 18 October 1640, in which he e also stated that he had a proof.But as with most of Fermats discoveries, the proof was not published or preserved. The ? rst known proof seems to have been given by Leibniz (16461716). He proved that x p ? x (mod p), which is equivalent to (3), by writing x as a sum 1 + 1 + + 1 of x units (assuming x positive), and then expanding (1 + 1 + + 1) p by the multinomial theorem. The terms 1 p + 1 p + + 1 p give x, and the coef? cients of all the other terms are easily proved to be divisible by p. Quite a different proof was given by Ivory in 1806. If x ? 0 (mod p), the integers x, 2x, 3x, . . . , ( p ? )x are congruent (in some order) to the numbers 1, 2, 3, . . . , p ? 1. In fact, each of these sets constitutes a complete set of residues except that 0 has been omitted from each. Since the two sets are congruent, their products are congruent, and so (x)(2x)(3x) . . . (( p ? 1)x) ? (1)(2)(3) . . . ( p ? 1)(mod p). Cancelling the factors 2, 3, . . . , p ? 1, as is permissible, we obtain (3). One merit of this proof is that it can be extended so as to apply to the more general case when the modulus is no longer a prime. The generalization of the result (3) to any modulus was ? rst given by Euler in 1760.To formulate it, we must begin by considering how many numbers in the set 0, 1, 2, . . . , m ? 1 are relatively prime to m. Denote this number by ? (m). When m is a prime, all the numbers in the set except 0 are relatively prime to m, so that ? ( p) = p ? 1 for any prime p. Eulers generalization of Fermats theorem is that for any modulus m, x ? (m) ? 1 (mod m), provided only that x is relatively prime to m. (4) Congruences 37 To prove this, it is only necessary to modify Ivorys method by omitting from the numbers 0, 1, . . . , m ? 1 not only the number 0, but all numbers which are not relatively prime to m.There remain ? (m) numbers, say a 1 , a2 , . . . , a? , Then the numbers a1 x, a2 x, . . . , a? x are congruent, in some order, to the previous numbers, and on multiplying and cancelling a1 , a2 , . . . , a? (as is permissible) we obtain x ? ? 1 (mod m), which is (4). To illustrate this proof, take m = 20. The numbers less than 20 and relatively prime to 20 are 1, 3, 7, 9, 11, 13, 17, 19, so that ? (20) = 8. If we multiply these by any number x which is relatively prime to 20, the new numbers are congruent to the original numbers in some other order.For example, if x is 3, the new numbers are congruent respectively to 3, 9, 1, 7, 13, 19, 11, 17 (mod 20) and the argument proves that 38 ? 1 (mod 20). In fact, 38 = 6561. where ? = ? (m). 4. Eulers function ? (m) As we have just seen, this is the number of numbers up to m that are relatively prime to m. It is natural to ask what relation ? (m) bears to m. We saw that ? ( p) = p ? 1 for any prime p. It is also easy to evaluate ? ( p a ) for any prime power pa . The only numbers in the set 0, 1, 2, . . . , pa ? 1 which ar e not relatively prime to p are those that are divisible by p. These are the numbers pt, where t = 0, 1, . . , pa? 1 ? 1. The number of them is pa? 1 , and when we subtract this from the total number pa , we obtain ? ( pa ) = pa ? pa? 1 = pa? 1 ( p ? 1). (5) The determination of ? (m) for general values of m is effected by proving that this function is multiplicative. By this is meant that if a and b are any two relatively prime numbers, then ? (ab) = ? (a)? (b). (6) 38 The Higher Arithmetic To prove this, we begin by law-abiding a general principle if a and b are relatively prime, then two simultaneous congruences of the form x ? ? (mod a), x ? ? (mod b) (7) are precisely equivalent to one congruence to the modulus ab.For the ? rst congruence means that x = ? + at where t is an integer. This satis? es the second congruence if and only if ? + at ? ? (mod b), or at ? ? ? ? (mod b). This, being a linear congruence for t, is soluble. Hence the two congruences (7) are simultaneously so luble. If x and x are two solutions, we have x ? x (mod a) and x ? x (mod b), and therefore x ? x (mod ab). Thus there is exactly one solution to the modulus ab. This principle, which extends at once to several congruences, provided that the moduli are relatively prime in pairs, is sometimes called the Chinese remainder theorem.It assures us of the existence of numbers which leave plus remainders on division by the moduli in question. Let us represent the solution of the two congruences (7) by x ? ? , ? (mod ab), so that ? , ? is a certain number depending on ? and ? (and also on a and b of course) which is unambiguously determined to the modulus ab. Different pairs of values of ? and ? give rise to different values for ? , ? . If we give ? the values 0, 1, . . . , a ? 1 (forming a complete set of residues to the modulus a) and similarly give ? the values 0, 1, . . . , b ? 1, the resulting values of ? , ? constitute a complete set of residues to the modulus ab. It is obvious tha t if ? has a factor in common with a, then x in (7) will also have that factor in common with a, in other words, ? , ? will have that factor in common with a. Thus ? , ? will only be relatively prime to ab if ? is relatively prime to a and ? is relatively prime to b, and conversely these conditions will ensure that ? , ? is relatively prime to ab. It follows that if we give ? the ? (a) possible values that are less than a and prime to a, and give ? the ? (b) values that are less than b and prime to b, there result ? (a)? (b) values of ? ? , and these comprise all the numbers that are less than ab and relatively prime to ab. Hence ? (ab) = ? (a)? (b), as asserted in (6). To illustrate the situation arising in the above proof, we tabulate below the values of ? , ? when a = 5 and b = 8. The possible values for ? are 0, 1, 2, 3, 4, and the possible values for ? are 0, 1, 2, 3, 4, 5, 6, 7. Of these there are four values of ? which are relatively prime to a, corresponding to the fact that ? (5) = 4, and four values of ? that are relatively prime to b, Congruences 39 corresponding to the fact that ? (8) = 4, in accordance with the formula (5).These values are italicized, as also are the corresponding values of ? , ? . The last mentioned constitute the sixteen numbers that are relatively prime to 40 and less than 40, thus verifying that ? (40) = ? (5)? (8) = 4 ? 4 = 16. ? ? 0 1 2 3 4 0 0 16 32 8 24 1 25 1 17 33 9 2 10 26 2 18 34 3 35 11 27 3 19 4 20 36 12 28 4 5 5 21 37 13 29 6 30 6 22 38 14 7 15 31 7 23 39 We now return to the original question, that of evaluating ? (m) for any number m. Suppose the factorization of m into prime powers is m = pa q b . . . . Then it follows from (5) and (6) that ? (m) = ( pa ? pa? 1 )(q b ? q b? 1 ) . . . or, more elegantly, ? (m) = m 1 ? For example, ? (40) = 40 1 ? and ? (60) = 60 1 ? 1 2 1 2 1 p 1? 1 q . (8) 1? 1 3 1 5 = 16, 1 5 1? 1? = 16. The function ? (m) has a remarkable property, ? rst given by Gauss in his Disquisitione s. It is that the sum of the numbers ? (d), extended over all the divisors d of a number m, is equal to m itself. For example, if m = 12, the divisors are 1, 2, 3, 4, 6, 12, and we have ? (1) + ? (2) + ? (3) + ? (4) + ? (6) + ? (12) = 1 + 1 + 2 + 2 + 2 + 4 = 12. A general proof can be based either on (8), or directly on the de? nition of the function. 40 The Higher ArithmeticWe have already referred (I. 5) to a table of the values of ? (m) for m 10, 000. The same intensiveness contains a table giving those numbers m for which ? (m) assumes a given value up to 2,500. This table shows that, up to that point at least, every value assumed by ? (m) is assumed at least twice. It seems reasonable to conjecture that this is true generally, in other words that for any number m there is another number m such that ? (m ) = ? (m). This has never been proved, and any attempt at a general proof seems to support with formidable dif? culties. For some special types of numbers the result is easy, e. g. f m is odd, then ? (m) = ? (2m) or again if m is not divisible by 2 or 3 we have ? (3m) = ? (4m) = ? (6m). 5. Wilsons theorem This theorem was ? rst publis

No comments:

Post a Comment