INTRODUCTION TO
NUMBER THEORY BY
TRYGVE NAGELL Professor of Mathematics
University of Uppsata
JOHN WIL.EY & SONS, II...
409 downloads
1466 Views
5MB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
INTRODUCTION TO
NUMBER THEORY BY
TRYGVE NAGELL Professor of Mathematics
University of Uppsata
JOHN WIL.EY & SONS, II7G. NEW YORK ALMQVIST & WIKSELL, STOCKHOLM
Printed in Sweden. IMP: GALA, 151 ALJMQVIST & WIESELLS BOKTRYCKER1 AB
PREFACE
Natural number is the original mathematical concept and the most fundamental. Speculations about the nature and properties of whole numbers doubtless constitute the oldest form of Inathematical thought. It is known that the Sumerians and Babylonians as well as the Ancient Egyptians had a fair knowledgeV of the properties of natural numbers. But first in connection with the Greeks is it
possible to speak of a proper theory of numbers. Pythagoras (circa 500 B. C.) and his pupils pursued extensive studies in the field of integers. The first systematic presentation of results in number theory with proof is to be found in Euclid's E1cviiruta (circa 300 B. C.). Among the later Greek mathematicians, Diophantos (circa A. D. 350) was of the greatest significance in the development of number theory; six of the thirteen books of his Arztlunetir have been preserved. It is also certain that number theory has a very old tradition in India. where it flourished during the period between A. D. 500 and 1200. Western Europe became acquainted with Greek mathematics mainly through the agency of the Arabs. But development was slow, and we cannot speak of an independent Western theory of numbers before the seventeenth century. The French mathematician Fermat (111011GG5) may rightly be regarded as the father of more recent number theory. Its further development before the nineteenth century was associated chiefly with the names of Euler (17071783). Lagrange (17361813), Legendre (1752 1833) and Gauss (17,4718.55). The first textbook in the theory of numbers was published in 17118 by Legendre under the title sur la thc%orie des nombres. But the really basic work is Gauss's book Di.cquisitiocaes
which appeared in 1801.
With that work number theory became a systematic science. Gauss himself considered that it was the greatest of all his works.
6
PREFACE
His opinion on the importance of number theory is expressed in his remark: "Mathematics is the queen of the sciences, and the theory of numbers is the queen of mathematics." The last hundred years have been characterized by an intensive development of number theory in many different directions. It is the aim of this book to give the reader a brief introduction to the most important results in the elementary theory of numbers. The book reproduces, in the main, lectures which I have given at the University of Uppsala. It should be possible for those with only the elementary college foundations of arithmetic and algebra
to read the greater part. Sections 27, 28 and 29 together with Chapters V and VII require a slightly wider knowledge of algebra.
In Sections 13. 16 and 17 and in Chapter VIII some simple results from analysis are used. Most of the exercises are not of a routine character but are really intended to supplement the theory with known and new results which are not otherwise included in the text. I should like to express my warmest thanks to Professor Dr.
Ernst Jacobsthal and to Dr. Sven Gellerstedt for their valu able help Uppsala, December 1950. TaYGVE NAGELL.
CONTENTS
CHAPTER I DIVISIBILITY I'agc
Section
1.
Divisors
.
.
.
.
.
2. Remainders
.
.
.
.
.
.
.
.
.
.
3.
Primes
.
.
.
.
. .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11
.
.
.
.
.
.
.
.
12 13
.
14
. .
16 19
.
21
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4. The fundamental theorem . . . . . . . . . . . . . 5. Least common multiple and greatest common divisor li. Moduls, rings and fields . . . . . . . . . . . . 7. Euclid's algorithm . . . . . . . . . . . . . . . . 8 Relatively prime numbers. Euler's pfunction . . . 9. Arithmetical functions . . . . . . . . . . . . . . 10. Diophantine equations of the first degree . . . . . ii. Lattice points and point lattices . . . . . . . . 12. Irrational numbers . . . . . . . . . . . . . . . . 13;. Irrationality of the numbers a and :r . . . . . . .
.
.
.
23 26 29 32 34 38 40
.
..
.
J'xerei sr c (140)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
. .
. . .
CHAPTER 11
ON THE DISTRIBUTION OF PRIMES 14. Some lemmata . . . . . . . . . . . . . 15. General remarks. The sieve of Eratosthenes 16. The function :r (.vl . . . . . . . . . . . . .
.
.
.
.
.
47
.
.
.
.
.
51
.
.
.
.
.
G4
17. Some elementary results on the distribution of primes 57 18. Other problems and results concerning primes . . . . 64 CHAPTER III
THEORY OF CONGRUENCES 19. Definitions and fundamental properties . . . . . 20. Residue classes and residue systems . . . . . . 21. Fermat's theorem and its generalization by Euler
.
.
.
.
.
6$ 69
.
.
.
71
CONTENTS
8
Page
Section
22. Algebraic congruences and functional congruences . 23. Linear congruences . . . . . . . . . . . . . . . . 24. Algebraic congruences to a prime modulus . . . . . 25. Prime divisors of integral polynomials . . . . . . . 26. Algebraic congruences to a composite modulus . . . 27. Algebraic congruences to a primepower modulus . . 28. Numerical examples of solution of algebraic congruences
73 7 (i
79 81
83 85 510
of integral polynomials with regard to a
29. Divisibility
prime modulus
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
30. Wilson's theorem and its generalization . 31. Exponent of an integer modulo u . . . 32. _Moduli having primitive roots
.
.
.
.
33. The index calculus . . . . . . . . 34. Power residues. Binomial congruences 35. Polynomials representing integers. . . .
.
.
.
.
93 99 102 107 111 115 120
36. Thue's remainder theorenl and its generalization by Scholz 122 (4189)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
124
CIIAPTER IV
THEORY OF QUADRATIC RESIDUES 37. The general quadratic congruence . . . . . . . . . 38. Euler's criterion and Legendre's symbol . . . . . . 39. On the solvability of the congruences .c 2 =  2 (mod p) 40. (,auss's lemma . . . . . . . . . . . . . . . . . . 41. The quadratic reciprocity law . . . . . . . . . 42. Jacobi's symbol and the generalization of the reciprocity law . . . . . . . . . . . . . . . . . . . 43. The prime divisors of quadratic polynomials . . . . . 44. Primes. in special arithmetical progressions . . . . .
.
.
.
.
.
132 133 136 139 141 14.5
149 153
CHAPTER V
ARITHMETICAL PROPERTIES OF THE ROOTS OF UNITY 45. The roots of unity . . . . . lS(i . . . . . . . . . .
46. The cyclotomie polynomial . . . . . . . . 47. Irreducibility of the cyclotoinic polynomial
.
.
.
.
.
.
.
.
.
.
.
158 160
CONTENTS
9
nc tiu
Page
48. The prime divisors of the cyclotomic polynomial .
.
164
.
49. A theorem of Bauer on the prime divisors of certain polynomials
.
.
.
.
.
.
.
.
.
50. On the primes of the form u y  1
.
.
.
.
.
.
.
.
.
51. Some trigonometrical products . 52. A polynomial identity of Gauss
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
168 170 173 174
.
.
.
.
.
.
.
53. The Gaussian suns
.
.
.
]sxerci ct x (90122).
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
177
.
.
.
.
.
.
.
.
.
.
.
.
180
CHAPTER V1
DIOPHANTINE EQUATIONS OF THE SECOND DEGREE
54. The representation of integers as sums of integral squares
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
55. Bachet's theorem . . . . . . . . . . 56. The Diophantine equation .r2  D y2 = 1 5 4. The Diophantine equation x2  D !/2    1 C' 58. The Diophantine equation if' D 59. Lattice points on conics . . . . . . . . 60. Rational points in the plane and on conics 61. The Diophantine equation a x2 + 1. r/2 ± r:2 .
.
.
.
.
.
.
.
.
1 88
.
.
.
.
.
191
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
204 212
.
.
.
.
.
211;
()
.
.
.
.
218
195 201
CHAPTER VII
DIOPHANTINE EQUATIONS OF HIGHER DEGREE 02. Some Diophantine equations of the fourth degree with three unknowns 227 . . . . 63. The Diophantine equation 2 ., 4  y4 = 22 . . 232 . 64. The quadratic fields K(11 11. K ('h _') and K (V) 235 .
.
.
1;5.
The Diophantine equation ;s = q3 equations . . . . . . . . . .
.
0 and analogous .
.
.
.
.
.
.
.
.
.
241
66. Diophantine equations of the third degree with an infinity of solutions . . . . . . . . . . . 246 . . 248 . 117. The Diophantine equation . 1) has at least one prime divisor, i. e. a divisor which is a prime. For, the least divisor > I of n
CHAPTER I
14
must clearly be a prime q, and the number n can now be written in the form n = q )n, where nn is a natural number. The following theorem was proved in Euclid's Elementa (9th book) :
Theorem 2. There is an if/inity of pri1nes.
Proof. It is sufficient to show that, for every given prime, there exists a prime which is greater. Let us arrange the primes in order of ascending magnitude, and let us number them accordingly, so that we put pI = l. 1`2 = 3, p3 = 5, etc. If we now put P1 p2   p = F, the number P + 1 is clearly not divisible by any of the first v primes. If q denotes the least prime divisor of P + 1, then q > p,,. The theorem is thereby proved. The method of proof, the same in principle as that of Euclid, also provides a possibility for determining increasingly large primes. 4. The fundamental theorem.  We begin by proving a lemma:
Let p be a prime and a a natural number not divisible by 1,. Then only the following positive multiples of a are divisible by p:
a.2p. a31)....
(1)
Assume, in particular, that a in is the least positive multiple of a which is divisible by p; then clearly 1 < in < p. Now let a h be an arbitrary positive multiple of a divisible by p. According to Theorem 1, we may put
r=h  mq, where q and r are integers, 0:_!S r < in. Thus the number
a r = ah  amq divisible by p. But according to the definition of the number in, we must have r = 0, and h is therefore a multiple of in. Since a p is divisible by p, in must be a divisor of the prime p; and since 9n > 1, we must have in =p. From this we conclude that every positive multiple of p divisible by a is included in is
the sequence (1).
From the lemma we obtain at once
15
DIVISIBILITY
Theorem 3. If the prime p dirides the product ab of the natural numbers a and b, then it neust divide at least one of the two factors a and b. For, if the number a were not divisible by p, then, according to the lemma, the number b must be a multiple of p. Theorem 3 is also to be found in Euclid's l;lcmenta (7th book). Euclid's proof is based, however, on the algorithm named after him. His algorithm is given in Section 7.
After these preparations we now continue with the proof of the fundamental theorem of number
Theorem 4. Every natural number n (> 1) can be expressed as the product of primes (prince factors) in the form (2)
ee = PI P2 ... Pr,
(e = 1).
There is only one such e. pression as a product (decomposition into Prime factors). if the order of the factor., is zeot taken into consideration.
Proof: The first part of the theorem is proved by induction in the following way. It is valid for the number 2. Assume that it is valid for all natural numbers < n. Then it is valid for n also. For, as we have seen in Section 3, ee can be written as a product, n = pI nl, where p is the least prime divisor of n. But, according to the hypothesis, the natural number n1, since it is < ii. can be written as a product of primes in the form assuming that it is > 1. Thus expression (`3) is 7111  P2P3 ' valid for u. The number r of prime factors is of course finite. Assume now that, besides (2), we also have a decomposition of ee into prime factors as follows, n = gIg2 ... q.,
where the factors qj are primes. If we now apply Theorem 3 to the identity (3)
Pipe " ' Pr = qI q2 ... q.
CHAPTER I
16
we see that the prime 71 must divide one of the primes p;; if we take this prime to be p1, then we must have pl = q1. On dividing (3) by pl, we obtain the identity A P3 .
1), _ (12 q3 ...
Q8
By analogous reasoning we see that )P2 = q2. Continuing in this
way, we have finally that r = s and that the numbers q1, q2, .... qr coincide with the numbers P1, P2, ..., p. , disregarding the order. The second part of the theorem is thereby proved. From the first part of the proof it is easy to deduce how the prime factors of a given number can be determined and the number expressed in the form (2). p, denote all distinct prime divisors of n; we Let P1, P2, may then express it in the form u =
(4)
pr
.
i=1
where a; is a natural number which depends on p; and n. Theorems in number theory can often be proved by means of induction. By this we mean that the proof proceeds according to the following schema: 1. By trial or in some other way we are led to the hypothesis: Every natural number n (> 1) has the property E. ?. We show that all tht primes have the property E. 3. We assume that the natural number in has the property E. 4. We prove by means of this assumption that the number nip has the same property, if p is an arbitrary prime. Then, by Theorem 4 (first part) all integers > 1 have the
property E, and the truth of the hypothesis in step
I
is
established.
5. Least common multiple and greatest common divisor. If the n integers a1, a2, ..., an are all different from zero, they have an infinity of common multiples; e. g. one of these is the product a1 a2 an. Consequently there must be a lea: t positire common multiple of the n numbers; it is denoted by the symbol .
(0
{a1, a2,
.,
ar+}.
DIVISIBILITY
17
If al, a2, ..., a are n integers, not all zero, they have but a finite number of common divisors; the numbers + 1 always occur among these. There is a greatest common divisor of the n num
bers; it is denoted by the symbol (al, a2,
(2)
. .
.,
a number _! 1. We shall also speak of the greatest com
mon divisor of the numbers in an infinite set of integers. We have the following theorems: Theorem 5. The least positive common multiple of the integers al,
a2...., a,, is a divisor of all the common vlldtiples of these number
Proof. The sum or the difference of two common multiples is itself a common multiple. Let in be the least positive common multiple. If Al is an arbitrary common multiple, by Theorem 1 we can write
r=111mq, where q and r are integers and 0 < r < in. Since vt q is a common multiple, r is likewise. But r < vm; hence, from the definition of in it follows that r = 0. Therefore DI is a multiple of m. Theorem 6. If d = (al, a2, ...,
there exist n integers x1, x2, ...,
x,, such that + an x,: = d.
al xl + a2 x2 +
(3)
Every common divisor of the integers al, a2, of (1  (al, On . ., a,,).
..., a is a divisor
.
Prool: Let us consider the (infinite) set M consisting of all the integers of the form al x1 + a2 x2 
(4)
.
. + a .z.'n,
where x1, x2, ..., x.,, run through all the integral values 0, ± 1, ± 2, etc. The sum or the difference of any two numbers in M
is itself a number in M. In particular, M contains all the numbers al , ae i ., an. The numbers in M clearly have the greatest .
.
2  516670 Trygve Nagell
CHAPTER I
18
common divisor d. For d is a divisor of all these numbers, and no number d1 > r1. in M has this property. since such a number r11 would be a divisor of all the numbers u1, a2, ..., an. Let do denote the least natural number in the set M. Further, let _V be any number in M. We shall show that X is a multiple of do. By Theorem 1 we can write
r= `duq, where q and r are integers and 0 5 r < do. The number r belongs to M, being the difference of two numbers in M. But, since r < do, this is only possible for r = 0. Thus all numbers in M are multiples of clo. Hence do is the greatest common divisor of the numbers in M, and therefore do = d. Thus the first part of the theorem is proved. If dl is any common divisor of the numbers al, a2, ..., an, it follows from equation (3) that d1 must be a divisor of rl. Let c be a natural number. From Theorems 5 and G we derive the rules and {a1, a2,
.
.
., anf c = {a1 e, a2 c,
.
.
., an C).
For two integers it is easy to prove Theorem 7. If a and b are natural numbers, irr, hare
Proof. By Theorem 5, the number Vu =
ab
{a, b)
is an integer. Then, a must be a divisor of a divisor of b (aab). In consequence,
(
1) is a common multiple
of a and b. Hence, by Theorem 5, {a, b) ah
(a, b)
(a, b), and b a
«li
is a divisor of
and therefore (a, b) is a divisor of mn. On the other hand,
since the numbers
19
DIVISIBILITY
a
_ {a, b}
and
G
71!
b
=
in
(a, L} a
are integers, the number iii is a common divisor of a and L. Thus, by Theorem 6. only when in = (a, b). Exanmple.
911
is a divisor of (a, b). But this is possible E. D.
If a = 12 and b = 15, we have (a, l.) = 3 and {a, b} = 60,
and in accordance with Theorem 7
3'60=12.15 180. 6. Moduls, rings and fields.  A set of numbers is called P. modtd when it has the following properties:
1. The set contains at least one number 0. If the numbers a and b belong to the set, their difference a  b also belon(,s to the set.
2.
Each modul contains the number 0. If it modul contains the
number a, it also contains the number  a, since  a = 0  a. If a modul contains the numbers a and L. it also contains the number a + b, since a + b = a  ( b). Examples of moduls are: 1. The set of all integers. 2. The set of all even integers. 3. The set of all rational numbers. 4. The set of all real numbers. 5. The set of all complex numbers.
But, the natural numbers obviously do not form a modul. Let aI, a2, . . ., a,,, be any numbers 0. The set of all numbers of the form aI xI + a2 ;r2 *
'+
a,,, ,rm .
where xI, .r2, ..., xm are integers, forms a mogul, which we denote by M(a,, a2, ..., a,,,) or, more briefly, by (a,. a2, .... am).
The number system al, a2...., a,,, is called a ycnerali?rv syOrfx of the modul. If a modul has the generating system NI P2, ., #, of r numbers, but no generating system of ., numbers, for < r, we say that the modal has the rank r. The system #I, then forms a ba.+'is of the modul.
Ch APTER 7
20
We shall prove Theorem N. A,iii rnodrrl M of (rational) integers caisi.,d.s of all m.zdti))l,,.q q/' the lrv(Xt l,asitire timber in M.
Proof. Let r( be the least natural number in M. If a is a number in M, there exist two integers q and r such that
r=a d q; where 0 c r < d (Theorem 1). Now, it is clear that the number r belongs to M. But by the definition of rl this is possible only if r = 0. Thus a is a multiple of d. If is clear that there is no other number in M having the same property as d. The modal [1] consists of the set of all integers. If the number I belongs to the inodul M containing only integers, we obviously have M= 111.
An immediate consequence of Theorems ti and 8 is Theorem I).
I/' al, a2..... a are iutrgcrs [al, a2,
....
[(al. (12,
0, ire burr ,
rz ].
Hence, any ruodul containing only integers has the rank 1. The modul [1,11/2] has the rank 2; for the equation (a+ b V2) x = 1, where a, b and x are integers, is possible only for b = 0, since I/2 is irrational.
A inodul is called a ring/ when it has the following property: If a and li belong to the rnodul, the product a b also belongs to the ruodul.
When 1) is an integer, the modul [1, 1/J is a ring. This is apparent from the relation ((1 + b 1'D) ((. + (I 1 1))  u e + b (11) + (a rl } b e) I'D.
From Theorem 8 we obtain Theorem 10. :Irir/ modul containing only (rational) integers is a ring.
This result is not valid for moduls in general. Thus the modul [V2] is not a ring, since the product V2 Y_'22_ = 2 does not belong to the modul; in fact, the equation 2 = `? t is not. pos
sible for any integer t.
DIVISIBILITY
21
A rim' is called a field when it has the following property: If a and 1, belong to the ring, the quotient also belongs to b the ring, provided b 0. Examples of fields are: 1. The set of all complex numbers. 2. The set of all real numbers or the rral field. 3. The set of all rational numbers or the rational ,iiPlcl.
There exist rings which are not fields. Thus the set of all integers is a ring but not a field. Every field K contains all the rational numbers. For, let a be 0 in K. Then K contains the number a = 1. any number a Thus, applying addition and subtraction, we see that all integers belong to K. Finally, applyingin division, it is clear that all rational numbers belong to K. Let a be any number 5,4 0, and consider the set of all numbers of the form ao+ala+a2a2+ +ama", bo i hl a + b2 a2 + + h all b,.. ni and it are integers, m 0 and if ? 0. This set is obviously a field; we denote it by K (a). Thus K (1) is the
where ak.,
rational field. If 1) is a rational number which is not the square of a
rational number, the number VD is_irrational (for the proof see Theorem 19 in Section 12). K (VD) is said to be a quadratic Every number in such a field may be written in the form _ a + bVD where a. b, a and (l are integers. Multiplying
r+aV1)
numerator and denominator by c  cl VD, we have 1
#
2
Dd2(arb(II) ad bc)VD)= if + rl l),
where it and r are rational numbers. The field K (VI)) is rral when I) is positive; in?aginary when D is negative. 7. Euclid's algorithm.  Let a and al be natural numbers, cr > rrl. If a is not divisible by aI, the principal remainder a2
CHAPTER I
22
of a modulo al is a positive number < ol. Dividing al by a2, we get the principal remainder a3 of al modulo a2. If a3 0, we may in the same manner find a new principal remainder a4 < a3. Repeating this procedure a certain number of times, we obtain a sequence of successively decreasing integers ? 0: (11>a2>r13>a4> and we must finally arrive at a division for which the principal remainder a,+, is equal to zero. Hence we have the following system of relations: a = a1 q1 + a2 .
() < a2 < al ,
al  a2 q2 + a3 .
0 0, then inequality (2) has only a finite number of solu
DIVISIBILITY
37
tions in relatively prime numbers x and y. For, if a y > 0, we get _ Ir, n 1hxayl> 1 .r.
y
al
and
=1)/I
'J
,!t
t,
Hence, if ('l) is satisfied, y < b.
On the other hand we have Theorem 20. If a is a real irrational numlwr, inequality (2) has
an infinity of solutions in relatirely prime integers x and y.
Proof. Let /1 be a natural number. Applying the result just obtained, we then determine a pair of relatively prime integers x1 and ill such that rI
711
where 1
1
u < "1 tl
f' 1
rpl s t1 . Since rc is irrational, 9h 54 0. Then we choose
a natural number /.2 > 1 and determine the relatively prime in'11
tegers T2 and y2 such that x2 '12
Y2
1 .
a
?1a> . . >71r> ....
where the number .r;
satisfies the inequality
This proves Theorem 20 The procedure just developed readily gives an infinite sequence of successively better approximations
38
CHAPTER 1
to the real irrational number a by means of the rational numbers x'
!/c
in the proof of inequality (1) we applied the socalled Dirichlet box principle: If more than t objects are distributed in f boxes,
at least one of the boxes must contain two or more objects. This extremely simple principle has nevertheless been very effective
in many mathematical proofs. 13. Irrationality of the numbers e and r  Let e = 2.7182R .. .
be the base of the system of natural logarithms, and let z = 3,14159 ... be the length of the circumference of a circle with the radius If. We then prove the following theorems. Theorem 21. The n umber e is irrational.
Proof. In the introduction to analysis it is proved that. when
it
+
+
II +...+
0 1. Now, choosing the number n in (1) so large that h divides n!, we obtain from (2)
0 0), i=1
r
b=
11 1),& t=1
(Pt > 0).
CHAPTER i
42
Further, denote by vg the least of the two exponents aj and /3; and by ,uj the largest of the same exponents. Prove the formulae
r
{a, b} =111)=
(n, b) f=1
.
i1
12. Prove the relations (a1, a2,
.
., an)
(a1, a2.
.
{a1, (72. .. ., an} _ al, a2. .
.
., ak .
J
. .
ak}.
.
.
.. (am. .
.
.
., {am .
.
.. a
),
.. an}}.
13. Prove the relations (a, { b, c})
(a, b). (a. c) },
{a, (b, r), = ({a, b}. {a, c}). 14.
Prove the relation
((a, b}, {a, (}. {b, c}) =
{(a,
b), (a, r), (b, c)}.
15. Show that the number of irreducible fractions between 0 and 1 whose denominators do not exceed the natural number
n is 71
I'P (m) M=1 16. Let N, in and n be natural numbers. Find, by means of the Euclidean algorithm, the greatest common divisor of the numbers
_l'n  1 and X",  1. N. Find all natural numbers 12 such that cP (u) _ 24.
18. Find all natural numbers 9)i < 100 such that the equation T (n) = in
has no solution. 19. If 12
is a natural number > 1. show that
a=g129(n),
DIVISIBILITY
43
the sum being extended over all natural numbers a which are prime to a and < n. Find all the natural numbers n satisfying the inequality 7: T (7:) < n.
Let F (n), G ()i) and H (n) be three arithmetical functions which satisfy the conditions G O2) = L H (d), r!
the sum being extended over all positive divisors d of n, and fl
F(n)
G (G). Lam]
Show that F(n)
r=
[t] H
What formula do we obtain by putting in the preceding exercise H(n) = 1 for all n? What formula do we obtain by putting in Exercise 21 G (n) = log n and applying Theorem 15? Prove the formula, n
n,:1
valid for all natural numbers n. Determine the arithmetical function W (n) defined by the relations F(d),
(1) = 1 and 1u (n) a
the sum being extended over all positive divisors d of n:. Suggestion: Apply the inversion formula of Mobius.
Show that there are infinitely many primes of the form 4n + 3, i. e. leaving the remainder 3 on division by 4.
Suggestion: Apply the same method as in the proof of Theorem 2.
44
CHAPTER I
27. Show that there are infinitely many primes of the form 6 n + 5,
i. e. leaving the remainder i on division by 6.
Suggestion: Apply the same method as in the proof of Theorem 2. 28.
If the number
2r1
is a prime, then 1) is a. prime. (11ersenne primes.) 29. If the number
2"+1
is a prime, then n is a power of 2. (Format primes.) 30. Show that every odd number can be written as the difference of two integral squares. In how many ways is this possible? 31. Solve completely the Diophantine equation
119x29y=8 in integers x and y. 32. Solve completely the Diophautine system
2x+ 5,, 11:=1, x  12y + 7 = 2 in integers r, y and z. 33. A natural number that is equal to half the sum of its positive divisors is said to be a perfect number. The least perfect number is clearly 6. Prove the following theorem of Euclid (Elen?e)ita, 9th book):
If 21" I is a prime, then 2"'1(2m  1)
is a perfect number. This is the case for nn == 2. 3. 5,
7,
13, 17, 19, 31, 61, 89.
107 and 127. No other perfect numbers are known than these twelve.
34. Prove the following theorem of Euler: Every even perfect number must be of the form just indicated
in the theorem of Euclid. No odd perfect numbers are known.
45
DIVISIBILITY
3:5.
Let it be a natural number having the distinct prime factors , pr. Prove the formula
14, I'2,
V (12 =' q (11) 112 i ( Or I; 9' 0r)AP2 ... 11,,,
the sun, being extended over all natural numbers a prime to it and < it. Suggestion : Start from the formula 12+1'2+.. I(/r1)2=1, 1,(,11)(21?1) and apply the inversion theorem of M bius.
36. Let n be an odd natural number having the distinct prime Pr. Prove the formula factors PI, P2,
,cl=II cp
(//1l)(p211 ... (Pr1),
1)r
the sum being extended over all natural numbers a prime to n and < s n. Suggestion: Start from the formula
1 +::+3+
r(1r1)=,A,(),2 1)
and apply the inversion theorem of Mobius. 37. Let n = 2 h + 1 be an odd natural number having exactly tc distinct prime factors of the form 4 t + 1 and exactly v distinct prime factors of the form 4 t + 3. Further, for / = 1, 2, 3, 4, let A, denote the number of integers prime to n in the interval I (r  1) it  I rn. Finally, for / = 0, 1, 2. 3, let B, denote the number of positive integers < it which are prime to it and of the form 4 t + r. Prove for u > 0 that
and Bu  = B1
B.,  B;;
Prove for p = 0 that l
=14+(1)'2'
:I. = 43 =
99()1)(1)1,2s,
46
CHAPTER I
and Bo
(n).,'s, B3
Bs__.j
9i
38. The Farey series of order n is the ascending sequence of irreducible fractions  satisfying the following conditions:
(a,b)=1 and 0a 0. On the other hand, if r = 0, it contributes 1. Consequently the number of objects having none of the properties is given by (5).
Suppose now that the N objects in Theorem 26 are the natural numbers < x, and thus N = [x]. Suppose further that E; denotes divisibility by the natural number a;. We then obtain the result: Theorem 27. Let a1i a2...., am be natural nsnnbers such that a,) = 1 if 1 J. Then the number of natural 'n embers < x
ON THE DISTRIBUTION OF PRIMES
are not is equal to
51
b!/ any one o/'the nrnnbers «I, a2, ..., a,,,
'
[ t ]  L [rr+ i
t
lT
r
l
ae ax akJ
the sums being exlended over all q/ the indices i, j, k, etc. ; the eondclrou:: i = 1. . 3, Pfc., in the /first I in the seeond wrnr, i > j > k =' I in the third .sunr, etc. i>
For the number of natural numbers < x which are divisible by every on(, of the numbers U. u etc., is obviously x 1 cc; crJ n,,
If, in Theorem 27, the numbers aI, a2, a3, etc.. denote the distinct prime factors of [x], we obtain a new proof of the
formula for Euler's pfunction in Theorem 11. 15. General remarks. The sieve of Eratosthenes.  It is theoretically possible to decide 'whether or not a given natural number n is
a prime by trying to divide it by every smaller natural
number. For, if n is not a prime, it must have a positive divisor > 1 and < n. This method does not presuppose any prime to be previously known; it is, however, inapplicable for large values of n. If the primes < Yn are already known, the question can be decided in a much shorter time by trying whether or not n is divisible by any one of these primes. Provided that it is not too large, the question can be solved by means of a factor table or a prime table. The largest prime table yet published was worked out by D. N. it gives the primes up to 10006721. By inspecting a prime table one observes that the prime numbers gradually become more scarce the farther one goes on in the sequence of natural numbers. In the ten intervals 1100, 100200, primes:
...,
900luau there are the following numbers of 25, 21, 16, 16, 17, 14. 16, 14, 15, 14.
CHAPTER 11
52
In the ten intervals each of one hundred numbers between 10000000 and 10001000 the corresponding numbers are 2, (i, 6. 6, 5, 4, 7, 10, 9, 6.
The largest number known at present to be a prime is 21
1 = 17014118'0'46046923173168730371,)884105727.
this was shown by Lucas.
The distribution of the primes in detail is most irregular. In an interval of relatively many primes, there may occur long sequences of consecutive composite numbers. Thus, there are no
primes between 1327 and 1361. A gap of this length does not reoccur until between the primes 8467 and 8501. When n is any positive integer, it is easy to construct sequences of a consecutive composite numbers; for instance, the numbers
(u F1)!+2,(n! 1)!+3... ,(1:±1)!+n+1 are all composite. On the other ]land, pairs of primes which have the difference 2, socalled prime twine, occur relatively often;
we have the following eight pairs of prime twins less than 100: 3, 5; 5, 7; 11, 13; 17, 19; 29, 31; 41, 43; 59, 61; 71, 73.
Among the first hundred primes after the number 100000000 there are ten pairs of prime twins. There are probably an infinity of pairs of prime twins; but the proof of this conjecture is at present beyond the resources of mathematics. When the primes = tax are known, the primes < x may be found in the following way. We write up the sequence of all integers s 2 and < .': in their natural succession. We first strike out all numbers divisible by then all numbers divisible by 3, further all numbers divisible by 5, etc., and finally all numbers divisible by q, where q denotes the greatest prime  J 'x. The remaining numbers obviously consist of all the primes that are > Vx and < x. For such a number cannot have any prime
factor < Vx, and it cannot be the product of two numbers > 1 `a.
This simple but effective method is known as Eratosthe
nes's siere method.
ON THE DISTRIBUTION OF PRIMES
53
Eramlde I. We consider the case x = 26 and apply the sieve method. The prime numbers < 1126 are 2, 3 and 5. We write down the integers from 2 to 26; we.first mark by a bar every second number counting from 2, then every third number counting
from 3 and finally every fifth number counting from 5. Then the sequence looks like this: 2. 3. 4, 5. 6, 7, 8, 9, 10, 11, 12, 13, 14, 1 n, 1 G,
17, 1 h, 19, 20, 211, 22, 23, 24, 25, 26;
The numbers not barred 7, 11, 13, 17. 119 and 23
are the six primes
 V26 and < 26.
L.rannple 2. If we take .r  300, the primes
1 300 are
2, 3. 5. 7, 11, 13 and 17.
Applying the sieve method we find the following 55 primes 1 300 and < 300: 19, 23, 29, 31, 37. 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89. 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 103, 167. 173. 179, 181, 191, 193. 197, 199, 211. 223. 227, 229. 233, 239. 241. 251, 257, 263, 2091 271, 277, 281, 283. 293.
By means of the sieve method we can also calculate the nionbcr
of primes which do not exceed a given limit This number is usually denoted by fr (x). For instance we have 7c (10) = 4, rc (Y300) = 7, c(300)=62. After the application of the sieve method to the sequence of integers _> 2 and < r, there are left exactly z (x)  :c (V x) integers. It is, however, possible to deduce
another expression for the number of integers remaining. For if we replace aj by pt in Theorem 27, and suppose that pI, ps, ..., l)m are all the primes < Yx, we find the following expression for the number in question
1 +[x
]
[Pil+[x_]

CHAPTER 11
54
% Te thus obtain the formula
it (rl) IJ
:r (.r)  :r (lr') _  1 +
(1)
the sum being extended over all positive divisors of the product t'1 P2 .. PM
It is, however. possible to improve this result considerably, as
was shown by Meissel. The formula estahlislled br him gives the best method up to now for numerical calculation of n (x). The following table an idea of the wav in which the function .T(.r.) increases. q
11
100
25
4000
5511
300
46
500(1
000
300
6000
783
44110
82 78
700))
900
500
05
811011
1007
Goo
109
:1000
1117
700 800
1_'5
111111111
1220
139
1000(10
0502
0(10
15a
100000))
78498
1000
11;8
1000000(1
0111.579
2(100
303 430
100000000
5761455
1000000000
50847478
:3000
The value of :r (1011) was calculated by Bertelsen from the formula
of Meissel; v (x) has not been calculated for values of .r larger than 1011.
16. The function c (x).  Legendre and Gauss occupied themselves with the problem of finding simple functions which give good approximations to 7r (x) for large values of x. Thus, in his book Thcorie de uo;ijbr (179); Legendre states that the function log x  1.08011
gives a good approximation to n (x).1 By means of prime tables ' here and in the following, log denotes the natural logarithm.
ON TAE DISTRIBUTION OF PRIMES
55
Gauss discovered that :r (x) may be very well approximated by each of the functions x log .L and
du log u
(1) 2
But he gave no proof of it. The function (1) is the socalled integral logarithm of X. The first demonstrated results are. however, due to Tchebychef,
who (1850), among other things, proved that the inequalities x 8 log .r. i (2)
< z (x) < _
log a
8
are valid for all sufficiently large values of x. He also showed
that the quotient of the numbers :a (x) and
log x
has the limit
I for increasing :r, provided that the limit exists. In 18911 Hadamard and Vallee Poussin, independently of each other, proved the existence of this limit and thus the relation lim
(3)
CC
n (X)
:r/lo:C
= 1.
Their proof of this theorem, the socalled prime nunmber theorem, is based on the theory of Riemann's zeta function (,) defined
by the infinite series (4)
(,) = 1
1
1
T
.$
31;
1La
for all complex values of s = a A i t when a > 1. Subsequently, by analytic continuation, (s) can be defined for all s I. The connection of the zeta function with the primes is obvious from A'nlcr's identzly
(
5 (.) _
=8 = n=1
II r
1
' ,=8 .
(a > 1)
CHAPTER II
56
the infinite product being extended over all primes p. To prove this identity we first verify that the infinite product is convergent the and different from zero for a> 1. For, since series Y, px I,
is absolutely convergent for a ; 1.
1
Since
+ I)R + p
+
and, therefore, because of the absolute convergence,
where p runs through all primes .r, and where n runs through all positive integers which have no prime factor >.r. Hence
Here the absolute value of the right hand side is obviously less than
Hence we have
x 1111,^x rim
1
l
1) = 0, .J tx
which proves the truth of identity (5). It may be observed that, in this proof, we make use of the fundamental theorem of number theory (Theorem 4). Riemann, perceiving the fundamental importance of the zeta function for the study of the distribution of primes, developed the elements of a theory for this function. He also formulated six hypotheses which lie could not prove. Especially the position of the imaginary zeros of the function appeared to be of great
57
ON THE DISTRIBUTION OF PH13MI,
importance for the applications to prime number theory. According to Rielnanu's famous but still unproved hypothesis, all All the other the imaginary zeros have the real part f7 hypotheses of Riemann have been proved by later investigators. Important contributions to the theory have also been made by Mangoldt. Landau, Bohr. Hardy. Littlewood and title Selberg. These results belong, however. to the higher analysis and will
not be developed in this book. We shall only mention the following result of Titchlnarsh
:rLr) Li(.r)
((1)
01.a..r
:...
a (log .Ail it is valid for all sufficiently large values where a. of r; E is a positive number. k and a are certain positive con
stants, and 0 denotes a function of x which varies between the limits  1 and 1. This formula, which was proved in 1935. expresses the best result up to now for the function T(x). It is easily seen from the formula that r (.r) is approximated by Li(.r) with Great accuracy. This is verified by numerical examples. For instance, if x = 1000000000. we have. apart from the decimals, 17.5i..
this difference is less than
L,000
.
of the value 7 (10").
It was shown by Littlewood that the difference :r (x)  Li (.r) assumes both positive and negative values infinitely often. There was a sensation when recently an elementary proof of the prime number theorem was given by Atle Selberg (1948). The proof is elementary in the sense that it uses practically no
analysis, except the simplest properties of the logarithm. We shall give this proof in Chapter VIII. 17. Some elementary results on the distribution of primes.  Let
us put, for x ? 2,
P =ll psx where the product extends over all primes have
1,
Then we
CHAPTER II
58
pr
I
I
P
P
'.
r
[rl .}.1
dit
I
=1n
f du It
it 1
1
or
Pa>logx.
(1)
Hence lint
(2)
TW
Thus, corresponding to every d > 0 there is a natural number I such that
11
n log 2V
log222> 12 ()2 + 1)log2.
If 2 n :9.t < 2 n + 2, we obtain
0(x)_>_49(2n)(n+ 1) log 2 >
.
log2
for all sufficiently large x. This proves the first inequality in Theorem 30.
The number (7) is clearly divisible by all primes p which are a and _ 2 n. Therefore we have P,
2st I 0
(22n)> (2:1)> 11v 1,
CHAPTER 11
62
and, by taking the logarithm, 2nlog 2>d (2
id.
If x = 2" (h integer > 1), it follows that i9(x)=(0 2",d,2"') + (c9 2""1 0(2",2) +
1. As was shown above, (x) has at least one prime divisor q1(x) modulo p. Hence = q, (x) g (x) (mod p).
(f')
where g (r) is a polynomial of degree in  I Inodulo p at most, provided that f (.c) is not a prime function. Therefore, by hypothesis, Ax) can be written in the form g (x)  c q2 (x) q3 (x)
' qa (x) (mod p)
as a product of prime functions and a constant. Combining this congruence with congruence (ti), we get congruence (a). The second part of the theorem follows directly from a remark in the beginning of this section. 7  5 1ti67U Tryyve \agell
CHAPTER III
98
It remains to prove the third part of the theorem. We may suppose that the prime functions qi (r) in (5) are primary and normal polynomials modulo 1), and that 0 c < p. Now suppose that there exists a second decomposition f (a,) of the same kind (5) (7) (7)
i'u (x) (mod p),
AX) = r1 I'1 (X)'.2
where rr(x) are primary and normal prime functions modulo p and 0 < c1 < p. Then clearly we have c1 = c and (8)
fl qr (x) i=1
(x) (mod p)
11
i=I
Using Theorem 55 we see then, that the prime function q, (r) must be a divisor modulo p of at least one of the prime functions r; (x), say of r1(.r). Since q, (x) and r1are both primary and normal, it is evident that q, (.v) = r1 (x.). In the identical congruence (8) we can divide both the members by the polynomial q1 (x) = P1. (x), since it is not identically congruent to zero modulo p
Thus we get the congruence p
11 q: (x) 
i=2
12
ri (x) (mod p).
By the same argument we prove that q2 (,r) is equal to some ri (x), say to r2 (x). Evidently this process may be continued, and we find finally that qi (x) =;j (x) for all i and that p = a.
Thus the proof of Theorem 56 is complete.
Example. Let us take p = 7 and f(x) =x8 + .[? + 2x"  2,x5 + 4x1x2
3x+ 3.
By trial we find the following result f (X) _ (x + 1) (x2 + 1)2 (x3 + 3) (mod 7),
where x + 1, x2 + 1 and xs + 3 are primary and normal prime functions modulo 7.
Remark. It is not possible to develop an analogous theory in the case when the modulus is a composite number. Theorems 55
and 56 are not valid in general.
THEORY OF CONGRUENCES
99
30. Wilson's theorem and its generalization.  When p is a prime it follows from Theorem 3:1 that the congruence xzi1  I = 0 (mod ii)
has the roots x = 1, 2, 3, .... p  1. By Theorem 41 we have then identically
01  1 = (x  1) (x  2)  (.r  p + 1) (mod j)). 
Put .r. =1) in this relation, and it follows that
(p  1)! _  1
(1)
(mod p).
This result is called Wilson's Theorem. after the discoverer. The first proof of it was, however, given by Lagran;e in 1770. The theorem may be extended to yield a criterion for primes: Theorem 57. A necessary and sufficient condition that an integer zz (> 1) is a prime is that (n  1)! + 1 be divisible bq n.
Proof: It remains only to show that the number (n  1)! + 1 is not divisible by n, when n is a composite number. If n is composite and q is a prime divisor of n, then q < zz, and therefore (n  1) ! is divisible by q. Hence the number ()z  1) ! + 1 is not divisible by n. It is, however, obvious that the test furnished by Wilson's Theorem is useless for large numbers n, since ()2  1) ! increases too quickly with 12.
Now suppose that the prime p is odd and put } (p  1)
q.
On the lefthand side of (1) replace every factor h + q (for h = 1,
2, .... q) by the congruent h  q  1, and multiply both sides by
1),z; then we obtain (q!)" =  ( 1)Q (mod p).
(2)
If the prime 1) is of the form 41z + 1, the righthand side of (2)
is  1. Hence we obtain the first part of Theorem
S.
If' p is a prime = I (mod 4), the congruence .)
CHAPTER III
100
has the ttro solutions
x+ The
i'uen
1)
(1)
!
3
(mod ji).
(3) ha., no .solution
when )p is a lmiulu
3
(mod 4).
We prove the second part of the theorem indirectly. If (3) were solvable for p = 4 n + 3, we would find by raising both sides in (3) to the qth power 1 (mod p).
xN1 = ( 1)9
But this is impossible. since by Ferlnat's Theorem (Theorem 35) :Cti1 = 1
(11104 11)).
If the prime p is of the form 4 n + 3, the righthand side of (3) is + 1. Hence one of the numbers q'  1 or q! is divisible by 1)
Hence eye have (7) )
(4)
1)!
±I
(niod1i).
For p == 3 and 23 the righthand side is ; 1; for j. = 7, 11 and
19 the righthand side is 1. In Chapter IV we shall give a rule for determining the righthand side of (4) for any prime.
Wilson's Theorem is a special case of the following more general result due to Gauss. Theorem u3.
Let a be a natural number > 2, and let N denote
the number of incongruent solutions of the congruence .42 = 1 (mod n).
(5)
Then, i f al, a2i
... ,
sy..teur modulu n,
f''` r; r
a,, are representatives of a reduced residue hare ao
%'33%5
(laodl n).
THEORY OF CONCRUENCES
101
Proof p means p (u). To every a prime to n there corresponds a unique a', also prime to it, such that aa' = I (mod n).
(i;)
Hence the numbers al. (12, .... aq can be divided into pairs a, a' whose product is congruent to I mnodulo 1). We have a = a' (mod a) only when a is a root of the congruence (5). Denote by Q the product of all the N incongruent roots of (5). If a is a root of (5), so is  a; since n > 2, the roots a and  a are incongruent modulo n. We have
a(a)=a21 (mod n).
(7)
Hence 1)',v (mod ),).
(8)
Now let Ql denote the product of all incongruent numbers a; (i = 1. ?, .... 9;) niodulo n which are not roots of (b), if there are and numbers of this kind, otherwise put Q1 = 1. By the congruence (6) it follows that loll = 1 (mod u),
and by (8)
P= QQ1.=(
1)3'
(mod a).
Q. E. D.
Applying the results of Theorem 47 to the number 1\, we find
that the product P is congruent to  1 modulo i, in the following cases: When n = 4; when a is a power of an odd prime; when it is twice the power of an odd prime. In all other cases P is congruent to + 1 modulo n.
Example. For u = 00 we have cp (n) = 16 and N = 8. The congruence
x2 = 1 (mod 60)
has the roots ± 1, ± 11. ± 19. t 29. How the residue classes modulo n which are prime to n may be divided into pairs is apparent from the following congruences 7 ( 17)
1 (mod 60)
and 1
(1)=11
(mod 60).
CHAPTER III
102
31. Exponent of an integer modulo n.  Let n be a natural number > 1 and a an integer prime to n. In the infinite sequence
a. a2, a3, a4...
(1)
there are numbers = 1 (mod n), since by Theorem 36 (2)
a`r. ('
1 (mod 72).
Suppose that ad is the first number in the sequence (1) which is 1 (mod n). Then a is said to belong to the exponent 6 modulo n. 6 is the order of a inodulo n. Congruent numbers modulo a have the same order modulo n.
Theorem. (O. Let a be a natural number % 1 and a an integer prime to n. 1. If a belongs to the exponent 6 modulo n, then the numbers (1, a2
ad
are incongruent modulo n. 2.
Further, if am = 1 (mod n),
theta m is divisible by 8. In particular, 6 is a divisor of 4P (n).
Proof. Suppose 6
k>h
1.
If we had
aR = ah (mod n).
then axh_ 1 (mod 12).
But, since 0 < k  h 6, this is contrary to the definition of 6. To establish the second part of the theorem put ))z = 8q + r, where q and r are integers, 0 < r < 6. Then we have a"
ad q+. = am = 1 (mod n),
and thus, recalling the definition of 6, r = 0. Hence 6 is a divisor of m. By (2) it follows that op (n) is divisible by 6.
Example. The following table for n = 55 gives the order 6 modulo 55 of all the positive integers prime to 55 and < 55.
THEORY OF CONGRUENCES
a
Numbers of order 6 modulo 55
I
1
1;
2
221, 34, 54;
4
12, 23, 32. 43;
5
16, 26, 31. :3'i: no
8 211
4, 6. 9, U. 19, 24, 20, 341, 41, 411, 49, 51: 2, 3, 7, 8, 13, 17, 18, 27, 2'5, 37, 3'i, 42, 47,
40
,
lu
103
48,
.5 2,
53;
i,u,nbp, s.
j
We next prove
Theorem 61.
Let n be a natural number > I and a an integer
prune to n. If a belonga to the exponent 6 modulo n and if nt is a natural number such that (m, b) =;u, then am belong.'r to the exponent
6
P
nzodido n.
Proof Suppose that the number am belongs to the exponent n modulo n. Then r is the least positive exponent such that (am)' = 1 (mod n).
(3)
Applying the second part of Theorem 60 we conclude from this congruence that my is divisible by 6. Thus, since (in, 6) = ct, we must have
where h is a positive integer. On the other hand we have m
d
(am)a = (ad)I' = I (mod n).
since a belongs to 6. Hence we conclude that h
I and v = 8 Q. E. D.
Exanmple. As in the above example we take n = 55. From the table we see that the number 2 is of order 20. Then, by Theorem 61, the numbers 24s 26, 212, 216
are all of order 5. This is verified by the table since they are
m 16, 36, 26, 31 (mod 55).
CHAPTER III
104
Let 6 be a positive divisor of
(n). If a is of order 6 modulo n, root of the
we say that a is a
x6 = 1 (mod n).
(4)
Theorem 62. Let ra be a nataral number > 1, let b be a positire divisor of (p (n) and let it he a root of ihr congruence (4). Then we hart,
1. A necessary and sufficient condition for a rout it of (4) to be a piinritire root of (4) i.5 that the nzrrnbe,s a, az,
(5)
(1rr
be incongruent modulo n. 2.
Let a be a primitive root uf' (4). A necessary and sufjricient condition for rt"` to he a rout ol'(4) is that (nr, a)  1.
.i. I/ the currgre(encr
xn'(") = 1 (mod n)
has a primitive root, it has (p (p )?,) primitive roots incongruent modulo U. P r o o f.
1 f a is a root of (4). all the numbers (5) are roots of (4).
The truth of the first part of the theorem is then ail immediate consequence of the definition of primitive root and of Theorem 30 (first part).
To prove the second and third parts we only have to apply Theorem 61 with tr = I and observe that the numbers rr, a`
. .
. aT ('
form a reduced residue system modulo n when a is of order 9;(n).
We next consider the special case when the modulus is a power of 2. Theorem 63. 1. Every odd integer x .crtisfies the congruence x2,32=
i)
1 (mod 2i')
when 13 ? 3. 2.
The number 5 is it primitive root of (6) when f ? 3.
105
THEORY OF CONGRUENCE' .9.
The nun?Lrr8 + 52:3
2
,form a reduced residue syste»z 'uodulo 2,3 irheu
Proof. The first part of the theorem is true for
3.
= 3, since
12 = 3= = a2 = 72 = 1 (mod 8).
If (6) holds, then '32
=1+2;t.
where t is an integer. By squaring we get x2' 31 +2.j1t+22,312 and 3
2'
1
= I (mod
23+').
We thus conclude by induction that the congruence (6) is true for all fi ? 3. To prove the second part of the theorem we suppose that the number 5 is of order 6 modulo 2.3. According to (6) and to Theorem 60 the exponent 6 is a divisor of 2+32. If 6 < 2.12, then 6 would be a divisor of 2.3s and b`
= I (mod M.
We can, however, show that for 213 _=
(7)
=3
1 + 23' +
2,3 T,
where 7' is an integer. This is true for P = 3. If (7) is true for a given value of the exponent #, it is also true when fl is replaced by fi + 1. For. by squaring both sides of (7), we have :)
24
=1+
2,1 + 2s+1 (T +
Va + 2,11 7' + 2;31 T$).
Thus we conclude by induction that the relation (7) is valid for : 3. Hence we cannot have 6 < 2,31, and it is clear every that 6 = V2.
CHAPTER III
106
The truth of the third part of the theorem follows from the second part and from the fact that the congruence  5k (mod 2i')
5/°
is not satisfied for any fi
2.
Now we introduce a new arithmetical function ,p(n) defined in the following way: yi (n) = 'P 07)
for n = 1, 2, 4 and n =pa, when p is an odd prime; 2.
zp (n)
for n = 211, when 3.
; 'P (n)
3.
i, (n)=.
iV'(Ni')
for any n having at least two different prime factors. Here where PI, P2, etc., are the different prime factors of n. {a, b, ...) denotes as in Section 5 the least common multiple of a, h, etc. From this definition follows
Theorem 04. If n is an integer > I and if a is prince to n. then a'°i") = 1 (mod )?).
For, by Theorem 311 this congruence is satisfied for to = 1, 2, 4 and n = tpa, where 17 is an odd prime, and by (6) also for n 213. Hence, using the definition, we see that the congruence is satisfied for any integer n. Theorem 64 has the corollary : Except for the cases n = 1, 2, 4, pa and ?pa, ithere p is an odd prime, we hare ay `f"') = I (mod ii).
In fact, the number y (n) is a divisor of a T(n), apart from the exceptions mentioned.
THEORY OF CONGRUETINCES
107
32. Moduli having primitive roots.  If n is a natural number > 1, and if et belongs to the exponent T (n) modulo n, a is said to be a primitive root niodido n or of the number n. We will now determine all moduli which have primitive roots. The number 1 is a primitive root modulo 2. The number 3 is a primitive root modulo 4. From the corollary to Theorem 64 it follows that every integer n which has a primitive root and is different from '? and 4 is either the power of an odd prime or twice such a power. We shall prove Theorem U.. 1. The natural number n > 1 has primitive roots if
n has one of the rabies
n= 2, 4. p° and 2p, inhere p is an odd prime, and in no other ca.,(,. 2. The number of incongrucnt primitive roots modulo n i+ then 9 9(99 n').
.i.
If d is a priniitire root of the odd prime p, and if the number 1 is not divisible by pp2, then g is a primitive root of Jf, for anp/ positive exponent a.
Proof The theorem is true for n = 2 and n = 4. We now have to distinguish three cases. First case: n = the odd prime p. Let 6 be a positive divisor of 1p  1, and denote by Z (6) the number of incongruent integers modulo p which belong to the exponent 6 modulo p. Then clearly (1)
1Y.(6)= p 1, d
where the summation extends over all positive divisors 6 of p  1. We have x1'`1  1 = (xd  1) h (x), where h (x) is an integral polynomial. By Theorem 35 the congruence xi'I
 1 = 0 (mod p)
108
CHAPTER III
iiicongrueut roots 1. 2, ... , p  I inodulo p. Apwe plying Theorem 43 with f'(x) = x) i  I and q (.r) see that the congruence
has the p
1
,x.1 1 = 0 (niod p)
(2)
has exactly b incongruent roots inodulo 1). If this congruence has a primitive root a, the numbers a, n2, a3.... , a') are the complete set of incongruent roots modulo p of (2) (Theorem (i2. first part). Among these roots exactly q.,(b) are primitive roots of (2) (Theorem 62, second part). Therefore it follows that congruence (2) has either q; (b) incongruent primitive roots Inodulo 1) or none at all. Hence we have either x (b) = 0 or x (b) = q (b).
It follows from Theorem 13 that (3)
where the summation extends over all positive divisors b of p  1. Comparing (3) and (1), we see that we never can have y (b) = 0; thus x (b) = (p (6) for any 6. Hence it is proved that every odd
prime has primitive roots. Second raxr: )) = p', 1) odd prime, a? 2.
Let q be a primitive root of p. If the number (/P1  I is divisible by p2. there exists another primitive root yI = h' + 1) of p such that !lii  (!I + p))' _ !!i'1 + (1)  1) q)'21) = 1  p qP2 (niod p2),
 1 is not divisible by 2. Thus we can choose the primitive root (1 modulo 1) such that qPi 1 is not divisible by 1)2. This condition satisfied, g is also a primiIt is clear that the number
yii
tive root of pa for any a. To show it we begin with the proof of the following lemma: The number is divisible by
pai anal not by pa.
By hypothesis this is true for a= 2. Suppose that (4)
Pa'2,P1)  1 4 r
pKi,
109
THEORY OF CONGRUENCES
where the integer c is not divisible by p. We raise both sides in (4) to the pth power and expand the righthand side by the
binomial theorem to obtain
fPa1(111:(1Tcjt'')J'=1
rj)a
is an integer. Since 2u it follows that 1 where
J,
p(p1)p'("1)rbjr"11.
(.2.1,

I
all,.,
3'1  3 are
a+
where the integer cl is not divisible by p. Hence the lemma is proved by induction. Suppose next that q belongs to the exponent 6 modulo p It follows from Theorem (S(( that 6 is a divisor of
Since q is a primitive root of p, the number p  is a divisor of S by Theorem 00. Thus 6 = p (p  1), where 0 < P C a  1 If 6 11"1 (p  1). then pu2 (1)  1) would be divisible by 6. and I
.
we would have 1 (mod 1)a),
which is contrary to (4). Hence 6 =p 1 (p  1). and (i is a priori. tive root of p". Third case: (i = 211" p odd prime. Among the primitive roots of p," there are also odd numbers. For, if p is even, then q + pa is odd. Every odd primitive root y of p" is a primitive root of 21,u. For, if y belongs to the exponent r) modulo 2p", then 6 is a divisor of T, (2 pc) = , (pa); further, since q belongs to the exponent (p (pa) modulo p", 6 ? p(i)a)
Hence 6 = op (pa) = (p (2p"). Thus the proof of the first and the
third part of the theorem is complete. The second part is a direct consequence of Theorem 62 (third part).
The primitive roots of a given modulus may be determined by trial. At the end of the book we give a table of the least primitive root of the first 150 primes. Examples. The prime 7 has the T. (G) = 2 incongruent primitive roots 3 and :1.
Since the number 36  1 = 7  13 is not divisible by 72, the number 3 is a primitive root of any power of 7.
CIIAPTER III
110
The prime 13 has the rp (12)  4 incongruent primitive roots 2, 6, 7 and 11.
If the rratual number rr (." 1) has and if d is a positive divisor of q;()?), there the
Theorem Ills.
r'oot.+,
x" = 1 (mod n)
(5)
has exactly d
roots 'modulo it.
Proof: By Theorem 62 this is true when d = be a primitive root of n. Then the number
Now let ry
r' (n)
d
belongs to the exponent d modulo n, and the numbers t2.
(6)
are incongruent modulo n (Theorems li0 and 61); hence, these numbers are roots of (5). Now let 6 be an arbitrary root of (5). Then it follows from Theorem 60 that 72 = gr` (mod )?),
where h is a multiple of
Therefore we have
21  ' (mod n),
where k is an integer ? 0, i. e. the number iy is congruent to one of the numbers (6) modulo n. Hence, there are no other solutions of (5) than those given by (0)). This proves Theorem 66.
A supplement to Theorem 35 is Theorem 67. Let n be a natural uctmber ;> 1. 1. There alrrays rxist integers which belong to the exponent ?p(n) modrtlo n.
2. Every integer prince to n belongs modulo n to an exponent which is a divisor of zV (n). .i. At least T(6) integers incongruent modulo n belong to a gir(ii poNitire divisor 6 of p(n) nrorlido n.
111
THEORY OF CONCRUE\CES
Proof. Suppose that n is divisible by p'i and bv no higher power of the prince p,. Lot p; denote a primitive root of p i, when p1 is odd; for p; _ 2 and ai 2, 9t denotes the number 5, and for pi = 2 and ai °= 2, !l, denotes the number 3. Now, aloply ina Theorem 40, we determine the common solution of the simultaneous congruences x 91 (mod pi'), x 9a (mod p 2 , .. , x = g, (mod p r).
where pl. p2..... )r are all the different prime divisors of n. Let the common solution be
x = (mod n). If belongs to the exponent 6 modulo n, then 6 is a divisor of yi(n). (Theorems 64 and 60.) On the other hand, $ belongs to the exponent T(1)1i) = y (prci) modulo ),'zt, when p, is odd, and when ),t = 2 and a; = 1 or 2; if p2 = 2 and a, > 3, then, by Theorem 63, 5 belongs to the exponent I q' (2'i) == y , ( 2 '  r ) modulo 2 "i.
Hence 6 is a common multiple of all the numbers y} (pAi) for i = 1, 2.... , t (Theorem 60). According, to the definition of y, (n) we have then 6 = y' (n). Thus the first part of the theorem is proved.
The second part of the theorem is a direct consequence of Theorems 64 and 110. Suppose that belongs to the exponent y, (u) modulo n. Let 6
be a positive divisor of y' (,t) and put
y b7a)
= q. By Theorem 6 1
it is then clear that the number ri  
belongs to the exponent 6 modulo n: and any number iol", where It is prime to 6. belongs to the same exponent 6 modulo n. This completes the proof of Theorem 67. In the example given in Section 31 the modulus is it  55, thus (,t) = 20. From the table we see that sixteen numbers
belong to the exponent 20 modulo 55, twelve numbers to the exponent 10 modulo 55, etc. Since the numbers 8 and 40 are not divisors of y)(55)=20, no numbers belong to the exponents 8 and 40. 33. The index calculus.  Let a be a natural number having primitive roots. If y is a primitive root of n, the numbers
CHAPTER III
112
(1)
1. //, /f2,
..
,
fT(x
I
form a reduced residue system modulo it (Theorem 60). In the set (1) there are T,(qr (n)) primitive roots, and these are the numbers q`, where c is prime to T (n). If ca is an arbitrary integer (n)  1 prime to it, there exists among the numbers 0, 1. 2.... exactly one number it such that a = rj!' (mod n).
The number It is called the index of the nnnlbrr a acith respect to the base g rnodaalo j?. and we write I
or. shorter,
= ind, it
l  ind a,
when no misunderstanding is possible. Example. The number 7 is the least positive primitive root of n = 41. Since 1:5 = i 3 (mod 41), the number 1.5 has the index 3 with respect to the base 7 miodulo 41.
We readily verify the followincr rules for the index calculus. 1.
Lt. 111.
IV. V.
ind (a b' ind a i ind b (mod (ra)). ind ((a'a) _ q ind a (mod 97 ()? ), when q is it natural number.
ind I = 0, independently of the choice of the primitive root. ind q= 1. when II is the primitive root chosen for base. Ind ( 1)  r (n), if it > 2.
The correctness of the last rule follows immediately from the congruence
gm("'  1 = (q `r(")  1) (q 'a (n` + 1) _ 0 (mod )1).
For, since y is a primitive root, we must have q1 `a i"i =  1 (miod )?).
The first four rules valid for the index calculus show an obvious analogy to the rules valid for logarithms. Many types of congruence problems may be solved more easily
by means of the index calculus. The condition for this is, of course. that index tables have been computed for all possible
THEORY OF CONGRUENCES
113
moduli up to a certain limit. Gauss at the end of his Disgttisitiones gives tables of indices for moduli up to 100. The Canon arithmeticlis of Jacobi contains tables of indices for all prime power moduli < 1000.
In the following example of an index table, the modulus is n = 19 with the primitive root 2. 'Number.
'
1
Index ......I 0 I
+ 3
4
° I 13 1
7
16
141 6
11 11? 11
I111
3 18
17
1?113
1
3
5
14
16
7
II"PI 111
4
17
lU
18 9
Since we have
ind (n  a) = ind ( a) = s' (n) + ind it (mod en)),
the latter half of the table may be omitted. If the number n has primitive roots, the linear congruence a x = h (mod rr),
where (a, n) _ (b, n) = 1, can be solved by use of index theory. In fact, this congruence is equivalent to ind a + ind x m ind b (mod
;n'
and therefore x is uniquely determined by the congruence ind x = ind b  ind a (mod
ri ).
I: sample. Let us consider the congruence
II H 9 x = 7 (mod 13).
The prime 13 has the primitive root 2, and we obtain the following index table. Xumbr'r
1
Index
0
2314
5
6
7
89
1
11
12
1141'3
9
J
11
31 8
10
I
6
H
Then we get
ind x = ind 7  ind 9 = 11 8=3 (mod 12) and
x = 8 (mod 13). 8  516670 Tr ,gre \ agell
114
CHAPTER III
The general binomial congruence a x'n = b (mod n)
may be treated in the same manner, as will be shown in the next section. By using index theory it is also possible to solve the exponential congruence
ax = b (mod n),
where (a, n) = (b, n) = 1. In fact, if n has a primitive root, this congruence implies x ind a = ind b (mod op ;)2 ).
Thus it is evident that the number (970?, ind a) must be a divisor of ind b. Hence, in this case, there are just (op(n., ind a) incongruent solutions modulo p oz). Example. Find the solutions of 7x = 5 (mod 17).
The prime 17 has the primitive root 3, and we obtain the following index table. Numbei Index
3
1 . ...
0
14
4
F+ I
12
5
7
.5
I1
10
HH
3
11
12
13
14
7
13
4
9
16
c,
II 8
Then we get 11 x = 5 (mod 16), and
x = 15 (mod 16).
Finally we shall show how it is possible, by use of index theory,
to determine the order f modulo n of a given integer a. The number f is, by definition, the least positive exponent that satisfies the congruence at = 1 (mod n).
If the modulus n has primitive roots, we have (modp (n)).
THEORY OF CONCRUENCES
115
Hence, putting If _ (g:
it. ind a),
we clearly have
34. Power residues. Binomial congruences.  Let it be an in0, and let a be an integer prime to n. If q is a natural number j 2 such that the congruence teger
x'c = a (mod n) is solvable, we say that the number a is a qth porter residcumodcdo n. In particular: the number a is a quadratic, cubic or
biquadratic residue modulo n according as q = 2, 3 or 4. Let p br an odd prime, let a be an integer not dirisible bq 1), and let n = p" and S = (q, pin)). Thrn the con
Theorems 66(,?.
gruence
x'r = u (mod n)
(1)
ha.v exactly S incongruent Nulutions modcclo it. if furl a is ditni 6. Otheruirr it has no solution. Proof: If we choose a primitive root modulo it. it follows from
(1) that q
ind x = hid a (niod ip (n)).
This is a linear congruence in the unknown ind x. Hence, applying Theorem 39, Theorem 68 follows. Exampl es. 1.
Let us consider the congruence xs = 3 (mod 13).
Here 6 = (8, cp .13))  4. IVe may take y = 2. Then ind 3 = 4. 8
ind x = 4 (mod 12). thus ind r = 2 (mod 3), and ind x = 2. 5, 8, 11 (mod 12),
and finally
x = 4, 6, i, 9 (mod 13).
CHAPTER III
116
2. Let us consider the congruence
x12
= 13 (mod 17).
Here 6 = (12, pC1 7)) = 4. We may take g = 3. Then ind 13 = 4, 12 ind:r,  4 (mod 16), and ind x = 3, 7, 11, 15 (mod 16), and finally
x = 6, 7, 10, 11 (mod 17).
3. Let us consider the congruence
a" = 4 (mod 29).
Here 6  (7,
29.) = 7. We may take g  2. Then ind 4 = 2.
But the congruence 7
ind x = 2 (mod 28)
has no solution. Hence the number 4 is not a 7th power residue modulo 29. 4.
Let us consider the congruence
x$ = a (mod p),
where p is a prime ? 5, and where a is not divisible by 1). If p = 6 nt  1, then 6 = (3, 6 mn  2) = 1. In this case the congruence has exactly one solution. If p = 6 m + 1, then 6 = (3, 6 m) = 3. In this case there are either no or three incongruent solutions. An example of the first category is the congruence
r,g = 2 (mod 7),
which has no solution. An example of the second category is the congruence X'= 6 (mod 7),
which has the solutions x m 3, 5, 6 (mod 7). According to Theorem 68 the congruence (1) is solvable if and only if a =.V'" (mod n),
THEORY OF CONGRUENCES
117
where h is an integer ? 0. Hence q'(") d
a
= 1 (mod .n).
Conversely, if this congruence is satisfied, and if a = #7 (mod n), 0, we have
where y is an integer
7(n)
d = 1 (mod n).
g7
Since g is a primitive root, the exponent y
8") is a multiple of
(n), and therefore b is a divisor of y. Hence we have proved Theorem 69. Let p be an odd prime, let a be an integer not divisible by p, and let n =1)" and b = (q, (p (W). The necessary and condition for the congruence (1) to be solvable is that the congruence m{ni
a
d
= 1 (mod n)
hold.
A supplement to this result is Theorem 70. Let p be an odd prince, and let a be an integer not divisible by p. Further, suppose that q is a natural number 2 not divisible by p. If the congruence x4 = a (mod pa)
is solvable for a 1, it is also solvable for all ('integral) exponents a> 1. Proof. If we put n  pa and 8 = (q, op (n,), then 8 = (q, p  I). If the congruence x7=a (mod P")
is solvable, we have by Theorem 69 r(a)
a 4 =1 (mod pa).
CHAPTER III
118
Hence q'(n1
rr'p
 =I Fp't.
where t is an integer. If we raise both sides of this equation
to the pth power, it follows that PO))
'Y Im(ne) J =(1 +P' i)n
n
=1
J
(I')p' t +
where ti is an integer since 2a a
m(pn) a
(1)
p=': 0 
= 1 + p,:TI t1'
a + 1. Therefore we have
I (mod
Hence, from Theorem 69 it follows that the congruence xQ  n (mod p"±I)
is solvable, and Theorem 7() is proved by induction.
Further, we can prove Theorem 71. If p is an odd prinir, and if n = p" and 6 = (q, 9P (M), there are
9)(n)
qth power residues incongruent mnodulo it.
Proof. By Theorem 69 the number required is equal to the number of incongruent solutions of the congruence T (")
,ca=1 (mod n). By Theorem 66 this congruence has exactly a°7) incongruent solu
tions. Hence the theorem.
Example. If n  17. there are four biquadratic residues in the interval 0  it, namely 1, 4, 13 and 16. We next consider the congruence (2)
xs = n (mod _'").
where a is odd, and prove
THEORY OF CONGRUENCES
119
Theorem 72. 1. If q and a are odd numbers. the congruence (2) has exactly one solution. 2.
Let a be an odd number and q = 2 m, where in is odd. Let the exponent a be ? 3. Then the congruence (2) has four incongruent solutions if a = 1 (mod 8); otherwise it has no solution.
.3.
Let a be an odd inunber and q = 2 in, where ni is odd. Then the congruence x9 = a (mod 4) has two incongruent solutions if a = I (mod 4); otherwise it has no solution.
Proof. If a ? 3, we have by Theorem 63 (3)
a = ( 1)h h" (mod 2"),
(4)
x  ( 1)" .5y (mod 2"),
where h, k, u and y are integers ? 0. Now suppose that q is odd. By introducing (3) and (4) in (2) we get
(1),i.59y=( I)h
5k
(mod 2a).
Hence tC = h (mod 2) and by Theorem 63 q y = k (mod 2a2).
This linear congruence has exactly one solution y. Therefore, the congruence (2) has exactly one solution x. In the proof we have supposed a ? 3. but the result is clearly valid also for
a=1 and a=2.
Suppose next that q = 2 in, m odd and a ? 3. By introducing (3) and (4) in (2) we get 52my _ (1)h . 51 (mod ?a).
Hence the number h is even, and thus a = I (mod 4). Therefore 2 m y = k (mod
2a2)
This implies k = 0 (mod 2) and a = I (mod 8). When this condition is fulfilled, there are two incongruent solutions y modulo 2a2, and consequently four incongruent solutions x modulo 2a.
Finally, it is evident that the congruence x2m=a (mod 4)
CHAPTER III
120
is solvable if and only if a = 1 (mod 4). When a = 1 (mod 4) it has the two solutions x = ± 1 (mod 4). Hence the proof of Theorem 72 is complete.
The theory developed in this section may also be used for solving the general binomial congruence a xm = b (mod n).
According to the results in Section 26, the problem can be reduced to the case where the modulus is a primepower. Example. We consider the congruence 11 xs = 17 (mod 56).
(5)
The number 3 is a primitive root of the prime 7. From the congruence
11 xs = 17 (mod 7) we conclude
ind x = 1 (mod 6)
4 I 3
and
ind x = 1, 3, 5 (mod 6). Hence
x = 3, 5, 6 (mod 7).
(6)
From the congruence 11.r
17 (mod 8)
we conclude 3 x m 1 (mod 8) and (7)
x= 3 (mod 8).
Combining (6) and (7) we finally get the following solutions of (5):
x = 3, 19, 27 (mod 56). 35. Polynomials representing integers.  An integral polynomial
f (x) represents integers for all integral values of There exist, however, other polynomials with the same property. An example is the polynomial of degree n
THEORY OF CO\GRtENCES
121
r(xl) (xn1) n!
12
which, by Corollary to Theorem 25, takes integral values for all integral values of x. When a polynomial represents integers for all integral values of the variables, we shall call it, for the sake of brevity, an i. r. polynomial (i. r. = integer representing). For such polynomials in one variable we prove Theorem 73. Erery i. r. polynomial J '(x) of degree n in the variable
x may be written in the form
f(x)=A0+Al(1) + A2 (2X) +
(1)
where the coPfffcPents :10.A1i .
.
+ A, (x),
., A. are
integers.
Proof Every polynomial f (x) of degree ii may be written in the form f(,r) = co + c1 (X1) +
(2)
r2 (2"')
+ ... + r" C.) , x
where the numbers co, r1, ..., c,, are uniquely determined. This assumption is true for polynomials of degree zero. Suppose that it is true for all polynomials of degree < n  1. Then it is also true for the polynomial f (x) of degree n. For, `if the coefficient of x" is ao, the polynomial g (x) _, f (.c)  ao n ! (x) is at most
of degree n  1. Hence the assumption is true for g (x), and by induction for all f (X).
Now suppose that f (x) is an i. r. polynomial expressed in the form (2). Since ,f (0)  co. the coefficient ro is an integer. Suppose
that the coefficients ro, c1, ..., cri are all integers. Then the coefficient
Cr
is also an integer. For by putting x = r in (2),
we have .f fr) = Co + r1 ( 1)
P2
( y) +
+ rr_ 1 1'
l + rr .
Since f (r) is an integer, we see that Cr is also an integer.
CHAPTER III
122
Hence, by induction, Theorem 73 is proved.
In particular it follows: If f (x) is an i. r. polynomial of degree n, the polynomial n! f(x) is an integral polynomial. If an i. r. polynomial for all integral values of the variables represents integers, which are all divisible by the same integer d, we say that the polynomial has the same fixed divisor d. For such polynomials in one variable we prove Theorem 74. Erery i. r. polynomial ,f (x) of degree n in the variable x, which ha, the fixed divisor d, may be writtenn in the ,form
f(x)= 40+A1(i)+
(3)
where the coefficients 10, A1,
..., A are integers divisible bi/ d.
P r o o f. The integer rlo is divisible by d, since f(0) _ AO Suppose that the coefficients AO, A , ,..., A,I are all divisible by d. Then the coefficient Jr is also divisible by d. For, by putting x = r in (3), we have
A0 + A1I 1J rt
_12
() + J
F
IrI
r r1) + ,.
Hence, Theorem 74 is proved by induction.
In particular it follows: If a primitive integral polynomial g(x) of degree n has the fixed divisor d, then d is a divisor of n!. For i. r. polynomials in several variables there are results analogous to Theorems 73 and 74. 36. Thue's remainder theorem and its generalization by Scholz. 
The following result due to Axel Thue is very useful for many questions in number theory. Theorem 7:1. Let n he a natural number > 1, and let c denote the
least integer > l'n. Then for any integer a prime to n, there exist two natural numbers x and y not exceeding e  1 such that (1)
a i/ = ± x (mod )i).
Proof. We consider all numbers of the form a y + x, where x and y are numbers in the set 0, 1 , 2, ... , e  1. Since there
THEORY OF CONGRUENCES
123
are in all e2 > )r such numbers, at least two of them must have the same principal remainder modulo n. (Dirichlet's box principle, see Section 12.) If we suppose a!/I + J'1 = e+!/2
`
.''2 (mod n).
we can write ''2  .r1 (mo(l )r).
a (!/1  !/2) 
(2)
Here
0 n, e > 1,
a
> 1, and let e and f
f
Then for anti integer a primp to n, there exist two natural numbers x and p/ such that
aid
ail
± x (mod n)
0 x log x  x  z log x + log Y 27r,
and thus, for x ? 4, log [x]!  2 log [I x] ! < x log 2 +
log x  log Y8 a +
Use the latter inequality to prove the relation t' (x) 2. Proof. From Theorem 80 we know that the congruence
r4 =  I (mod p)
(4)
is solvable only if 1, = 1 (mod 4). From the proof of Theorem 81 (first part) we see that congruence (4) always has solutions if 1) = 1 (mod 8).
Now suppose that p = S (mod 8). If (4) were solvable, we should have from this congruence nI
xjiz
pI
(.r.4) 4 _ ( 1) 4
1 (mod p).
But this is contradictory to Fermat's theorem. 40. Gauss's lemma.  We shall establish the following useful lemma due to Gauss: Theorem 8;. Let p be an odd prime and D an integer not dirisible by p. If p denotes the number of integers in the sequence (1)
1 .A 2 D,
.(1)
1)D,
140
CHAPTER IV
p are > } p, then we have
whose principal remainders
(D1
= ( 1)
Proof. The numbers (1) are clearly incongruent modulo p. For, the congruence h D = k 1) (mod p) only holds for h = k (mod p). Let al, a2, .a u be those of the principal remainders modulo p) of the numbers ( 1 ) which are > z p, and NI, P 2 , f. those
which are < 11). Then A + u = t (p  1). The numbers p  aI,
p  a2, ... , p  a,, are all in the interval 0  Ip. None of these numbers is congruent to any one of the numbers flp modulo p. For, p  a = flj (mod p) and a, = rD, flj D (mod p) implies r + s = 0 (mod p); but this is impossible, since r and s belong to the sequence 1, 2, ..., j (p 1) and have a positive sum < p. Thus, the a (p  1) numbers Y1+N2,....flx,pa1,pa2,....pa
(2)
are all the natural numbers < Y (p  1). Hence, forming the product of all the numbers (2), we get #1 #2 ... YZ . (p  a1) (p  a2)
(p
(1)  a,,)
y 1) ! = ( 1)" . (P. 2)! W (P1) (mod p).
Since
it follows that
Di(n1)  (n) (mod p), p
I I=(l)', and Gauss's lemma is proved.
Now suppose that D is a positive number. For k = 1, 2, .. (p  1) we put
kD= p('hD]
,
+ rk,
where rk is the principal remainder of kD modulo p. Then, taking
the sum over all k, and recalling the identity
141
THEORY OF QUADRATIC RESIDUES
we get the relation k«1)
s(1)21)D=p
(3)
x _1
Ir D
p
+A+Ii trill+A+B,
where A is the sum of the numbers a1 , a2 ...
, a and B the
sum of the numbers #1 i j2.... , f .. Further we have A
(Tr
L
1+2T
ai) T 2#,
'+
11(p1)=n(121)
or
,upA+B=''(p21).
(4)
Eliminating B between (3) and (4) we obtain
I(p21)(II1) (DIcc)p+2d. Hence (5)
,u= 1II +(p2 1)(D 1) (mod 2).
When D = 2, then DI = 0, and thus p ='1(1)2  1) (mod 2).
Hence we have a new proof of formula (3) in Section 39. 41. The quadratic reciprocity law.  We first prove a theorem of Eisenstein: Theorem S(i. Let a and h be two odd integers > 3. li' (a, b) = 1,
and a'=v(a 1), b'=1(I,1), we have 11 n=1
aL. cr
a=1
G
Proof. We consider the a' b' integers (1)
buar
for n = 1, 2. ... , a' and r = 1, 2.... , V. None of these numbers is equal to zero. For, since a and 1 are relatively prime, the equation b u = a u implies n a t, v= b t. Exactly
CHAPTER IV"
142
I
a'
[hit]
of the numbers (1) are positive. For, if u is fixed, then ba> a ' b +r for r = 1. 2. , Further, exactly .
.
1r, ar
(G
of the numbers (1) are negative. For, if a is fixed, then b it < a r
for a = 1, 2.... ,
[J.
Thus the theorem is proved.
The proof may be interpreted geometrically as follows: In a twodimensional rectangular coordinatesystem with the abscissae x and the ordinates y we draw the straight line L from the origin to the point (a, b). In the first quadrant we mark the lattice points (x, y) which satisfy the conditions
l <x 1, then /m (2)
=0,
where the vum is extended over all nuniber.c m in a reduced residue s?/xteni modulo P.
CHAPTER IV
150
Proof. There always exists an integer b such that
(7;)=
(3)
 1.
P For, let p be a prime factor of P, put T" = , and denote by i a quadratic nonresidue of p. Then we can determine an integer b satisfying the congruences b = j9 (mod 1)),
b = I (mod P');
this is possible by Theorem 40, since (p, P') = 1. This number b satisfies the relation (3), since b
j)  \p11P'l  \pl lF'l
 1.
If the number nt runs through a reduced residue system modulo P,
so does the number nib, since b is prime to P. We therefore obtain
(MP)=G).(y)S.
S= in
Q. E. D.
Hence S = 0.
Let ,u denote the number of incongruent numbers a modulo P
such that
\'1
= + 1, and let v denote the number of incongruent
numbers b modulo P such that (P) states that
1. Then Theorem 91
it = v = lop (P).
(4)
Now we pass to the determination of the prime divisors of the polynomial (1), where 1) is a squarefree integer 71 1. It is
evident that the prime
`?
and every prime factor of I) are
prime divisors of the polynomial. Therefore, apart from these primes, the problem is to determine the odd primes p for which
\)+1. `
It is convenient to distinguish four different cases.
THEORY OF QUADRATIC RESIDUES
151
Case 1. D == ± P  1 (mod 4); P > 0. Let al, a2...., a,. denote the z op (P) odd integers in the interval
0  3 P for which
(a1) _ + 1, and let b1, b2.. . .. b, denote the
p(11) odd integers in the same interval for which (11)
Then, the necessary and sufficient condition for the prime p
(which is not a divisor of 2 D) to be a prime divisor of the polynomial (1) is that
pmas (mod2P),
(i=1,2. ...v).
For, it follows from Theorem 90 that \pl\1'/=\1'1=+1.
On the other hand, the primes q which are not prime divisors of the polynomial (1) are characterized by the congruence conditions
gmbt (mod2P),
(z=1,
...,v).
.F'xa»zple 1. If 1) = 21, we find that the prime divisors of the polynomial x2  21 are, apart from 2, 3 and 7, the primes p satisfying any one of the congruences
p m 1, 5, 17. 25, 37, 41 (mod 42).
Example 2. If D =  15, we find that the prime divisors of
the polynomial x2 + 15 are, apart from 2, 3 and 5, the primes p satisfying any one of the congruences p m 1, 17, 19, 23 (mod 30).
CaNe 11. D=±Pm3 (mod4); P>0. Let a1, a2...., a, denote the . ip (P) integers in the interval 0  l P which are =1 (mod 4) and for which (a) _ + 1. Let bl, b2, ... , b, denote the 99 (P) integers in the interval 0  4 P z which are 3 (mod 4) and for which C.:)  1. 16
=
CHAPTER IV
152
Then, the necessary and sufficient condition for the prince p
(which is not a divisor of 2 D) to be a prime divisor of the polynomial (1) is that either 1' = a; (mod 4P),
(i = 1, 2..
p = br (mod 4 P).
(.j = 1, 2,
or .
v).
For, it follows from Theorem 90 and formula (6) in Section 42 that.
P)
=
(LP
Example 3. If I) = 15. we find that the prime divisors of the polynomial x2  15 are. apart from 2, 3 and 5, the primes p
satisfying any one of the congruences p = 1. 7, 11, 17, 43, 49, 53, 59 (mod 60). ("asp 111. D = ± 2 P = 2 (mod 8); P > 0.
Let aI, a2.... , ay, denote the T (P) integers in the interval 0  8 P which are .
.
are
I (mod 8) and for which (
1. Let bl, b2
., li,r denote the T (P) integers in the interval P)
3 (mod 8) and for which (rP
0  8 P which
1.
Then, the necessary and sufficient condition for the prime p (which is not a divisor of D) to be a prime divisor of the polynomial (1) is that either p = a; (mod 8P),
(i=1,2.....4),
l  l)f (mod 8 P).
(.i =1. `_', ... ,
or
)
For, it follows from Theorem 90 and formula (7) in Section 42 that (D) =(1)a(p2] (t) =\a'/+ 1.
Example 4. If D =  6, we find that the prime divisors of the polynomial x2 r G are, apart from 2 and 3, the primes p
satisfying any one of the congruences 1)
1. 5, 7, 11 (mod 24).
THEORY OF QUADRATIC RESIDUES
Cage IV. D = Let aI, a2i
... ,
153
22 P _ 6 (mod 8).
a,r denote the (p (P) integers in the interval 0 8 P
which are either = 1 or = 3 (mod 8) and for which Let bI, b2,
... ,
b,, denote the go (P) integers in the interval 0  b P
which are either = 5 or = i (mod 8) and for which Then, the necessary and sufficient condition for the prime p (which is not a divisor of I)) to be a prime divisor of the polynomial (1) is that either
/  ar
(mod 8 P),
(i = 1. 2.....
l) m bi (mod 8 P),
(J = 1, 2, ... ,
01,
)
For. it follows from Theorem 90 and from formulae (6) and (7) in Section 42 that 11;i
1?
\
l = Gl
Y/ =
+ 1.
Example :i. If D = 6, we find that the prime divisors of the polynomial x2  6 are, apart from 2 and 3, the primes p satisfsina any one of the congruences p = 1, 5, 19, 23 (mod 24).
The results obtained may be expressed, less precisely, in the following manner: Let D be a square free integer
1. J iewn 1 the. 92 (41 D I) integerk
prime to 4 I I) I in the interval U  4 11) 1. there are, ,u = z q: (4 1
rl,
the

1)
property: Ever// prime
of the polynomial ors  D is congruent to any one of the lrrc»rbers )  1 ')  2 ,.. rr, morlrrlo 4 I D 1, or it is a divi,or of 2 D. 44. Primes in special arithmetical progressions.  In Section 18 we mentioned the following theorem of Dirichlet: If r and n are relatively prime natural numbers, then there are an infinity of primes = r (mod rr). By applying the results of the preceding section we shall prove this theorem in some special cases. It
CHAPTER IV
154
follows from Theorem 58 that the odd prime divisors of the polynomial 2'2 + I are the primes of the form 4 n + 1. Now. according to Theorem 45 every integral polynomial which is not
a constant has an infinity of prime divisors. Thus, there are infinitely many primes of the form 4n + 1. It follows from Theorem 88 that the prime divisors (different from 2 and 3) of the polynomial x2 + 3 are the princes of the form 6 n + 1. Thus. there are infinitely many primes of the form 6 n + 1. More generally we have Theorem 12. There are infinitely many primes of each of the forms
4n + 1, 6n + 1, 8n3, 8n1, 8n + 3. 12n1, 12n + 5.
12n5.
Proof. We consider the following six polynomials in x:
Jt
1.2 (2.r.. + 1)2 + 4,
js (.r) = P= (2,r +
1)2
+ 2,
f:4(x)°12P2x21, f(x) = P2 (ti.r. + 1)2 + 4, .16 (x) = 3 P2 (2.,. + 1)2 + 4,
where P is an odd integer. We have, from the results in Section 43:
1. The prime divisors of the polynomial ji (x) are the primes of either of the forms 8 n + 1 and 8 ?a  3, with the exception of the primes dividing P. are the primes of 2. The prime divisors of the polynomial f2 either of the forms g n + 1 and 8n  1, with the exception of the primes dividing P. 3. The prime divisors of the polynomial J; (x) are the primes of either of the forms 8 n + 1 and R n + 3, with the exception of the primes dividing P. 4. The prime divisors of the polynomial f4(x) are the primes of either of the forms 12 n + 1 and 12n  1, with the exception of the primes dividing P.
THEORY OF QUADRATIC RESIDUES
155
5. The prime divisors of the polynomial fs (x) are the primes of either of the forms 12 n + 1 and 12 n + 5, with the exception of the primes dividing P. 6. The prime divisors of the polynomial f6 (x) are the primes of either of the forms 12)? + 1 and 1271  5, with the exception of the primes dividing P. Let ,f; (.r) be any one of the six polynomials just defined. For i = 1, 2, 3, let m = 8; for i = 4, 5, 6, let in = 12. Then, the prime divisors of f: (:t4) are the primes p (not dividing P) which
are either = 1 or = r (mod nz), where r is a certain number prime to in and not = 1 (mod m). Now assume that there are only a finite number of primes r (m.od m), and denote by P the product of these primes. If P has this value, the number f; (x) cannot, for an integral value of r , be divisible by any prime = r (mod ni). For f (x) is congruent to one of the numbers  1, 2 or 4 ulodulo P. Therefore, as a consequence of the properties of the prime divisors of f (x) just mentioned, we see that the number f; (x) is the product of primes ° I (mod en). But, this is impossible. since such a product is itself = 1 (mod ni). It is, however, easy to verify that f; (x) = r (mod nt),
for all i. Hence, the hypothesis that the number of primes = r (mod nn) is finite is false, and Theorem 92 is proved. We finish by proving Throrew 98. There are infinite y many primes of the form 8n + I. Proof. It follows from Theorem 84 that the odd prime divisors
of the polynomial x4 + 1 are the primes of the form 8 n + 1. Assume that there are only a finite number of primes = 1 (mod 8),
and denote by P the product of these primes. Then, the number (2 P!/)' + 1 would not be divisible by any prime = 1 (niod 8).
But, this contradicts the fact that every prime factor of this number must be = 1 (mod 8).
CHAPTER V
ARITHMETICAL PROPERTIES OF THE ROOTS OF UNITY
45. The roots of unity.  According to the rules valid for complex numbers we have (cos T, + i sin T)" = cos nz c' i i sin n i'
for all integers n. (Moivre's formula.) Hence, we conclude that the algebraic equation has the roots (1)
e,,,  = cos
2±rm )[
+ i sin
:3"n I!
On=0,1,2,....ii  1).
It is apparent from their position in the complex plane that the numbers (1) are all distinct. For, if C is the circle with radius 1 and centre at the origin, the numbers (1) form the vertices of a regular polygon with a sides inscribed in (' so that one vertex lies on the positive real axis. The n numbers (1) are called the nth roots of unity. The number cos
+ i sin
2z >n
does not change if n is replaced by in + n t, where t is any integer.
The number + 1 is always among the roots (1), the number  1. however, only if is is even. The product of two nth roots of unity is itself an nth root of unity.
THE ROOTS OF UNITY
157
If sm denotes one of the numbers (1) which has the property that all the numbers i,1
9
0 En=, 1 Eni, Eon,
(2)
ni
are distinct, we say that sm is a primitive nth root of unity. Then the numbers (2) represent all the nth roots of unity. We now prove the following theorem: A necessary and .aflicient condition ,for sm to be a primitive nth root of unity is that the integer m be prime to n.
Proof. Suppose that m and n have the common divisor d > 1. Then not all the numbers (2) can be distinct; for by (1) we have 11
s'1 = 1 = s0 M
.
On the other hand, suppose that (m, )i) = 1. Then the numbers (2) are distinct; for if r
we should have
cos
2 a7n(rs) + i sin 2Z,n(r+) = 1. n
is
But r  s is no multiple of n, since I r  s I < a. Thus the number of primitive nth roots of unity is equal to the number of positive integers < zz and prime to n, and consequently equal to q, (n). The number sI is a primitive nth root of unity. When ii is a prime, each nth root of unity is primitive, except eu = 1. From the preceding result follows at once:
If s
is a primitive nth root of unity which satisfies the algebraic
equation
Z  1 = 0,
the positive integer N must be a multiple of it.
For n = 2 the roots of unity are + 1 and  1, of which the latter is primitive. For n = 3 there are two primitive roots, namely
CHAPTER V
158
el=(1+i13), and e2e=Y(1i13), which are the roots of the equation e2 + e + 1 = 0. For n = 4 there are two primitive roots, namely ± i. 46. The cyclotomic polynomial.  The polynomial of degree T ()i)
F. (x) = ll (x  ea),
(1)
0
the product extending over all primitive nth roots of unity, is called the cpclotomic polynio#nia7 of index n.
Let pl, P2, ... , pr denote the distinct prime factors of ii; further, put 110
and for I
v
(2)
=x" I
r
JJ _ JJ(xPIPl.,...P1,  1)
the product extending over all the v indices ix which satisfy the conditions
1 = it 1 and IA > 0, the righthand side of (3) is not divisible by x  sb. On the other hand, if d = I and u = 0. the righthand side of (3) is divisible by x  8b and by no higher power of this linear function. Since, in this case, Sb is a primitive 7th root of unity, we have established the identity (3).
From (3) it follows that 1 (x) is an integral polynomial in x. For both the numerator Ho 112.. and the denominator 111113 are integral polynomials, in which the highest power of ..v has the coefficient 1. Carrying out the division in the usual manner, we obtain a quotient which is an integral polynomial in x. From (3) we easily deduce the identity
CHAPTER V
160
(4)
1 n (),P)
F
I ,n P (x)
provided that p is a prime which does not divide n. On the other hand, if p divides n, we clearly have F" 1, (x) =
(J)
1''v, (xi).
Applying the formulae (3), (4). (5) we calculate the following special cyclotomic polynomials
1'2(x)_.; + 1, F3(:) ..,2 FS (.T) = x4 + C3 + x2 + ., T 1. 11'9
=x6 *
.X'3 + 1,
1,16 (x)
1,
=xx
=x4 x3  x2 .r
.1 10
x
r
1,
'.'4 (X) = X'
1,1 (x) = x4 t 1.
11.2 (x)=x4.r2 + 1.
h20(x)_a'1.1
F' 21 (x) =x'12 211
x9  x61 6 __
rx x
1,
x3  x t 1 .
If p is a prime, we have F1,(x).,r
1
(6)
For n > 1 the constant term in F (x) is equal to 1. To prove it we have only to put .r = 0 in (3). By putting x = 1 in (3), we get the following result for n > 1: (7)
P. (1)
 lIp, when n is a power of the prime p,
1, when n has at least two distinct prime factors.
47. Irreducibility of the cyclotomic polynomial.  A polynomial i'(x) in x with rational coefficients is said to be reducible when there exist two polynomials in x, not constants. with rational coefficients, such that f (x) = g (x) h (x).
Otherwise the polynomial f (x) is said to be irreducible. We prove the following lemma: Lemma 1. Let f (x) and g (x) be two polynomials with rational coefficients. If g (x) is irreducible, and if f (x) and g (x) have a common zero, then f (x) is divisible by g (x).
THE ROOTS OF UNITY
161
Proof. Let a be the common zero. The greatest common divisor d (x) of f and g (x) cannot be a constant, since it has the factor x  a. Since g (x) is irreducible, it has no other divisors than constants and divisors of the form ay (x), where a is a 0. Hence d (x) = a g (x) and therefore f'(x) is rational number divisible by g (x).
A consequence of this result is that an irreducible polynomial can never have any zero in common with a polynomial of lower degree; here the coefficients are supposed to be rational. We next prove
Lemma 2. If the integral polynomial f (x) = x'" + 01 X!,1 +
+ cf,
is divisible by the polynomial with rational coef g (x) = xm + b,,
x'°I + ... + b,,,,
these coefficients are necessarily integers.
Proof. We may suppose that f (x) = g (x) 11 W,
where the polynomial h (x) has rational coefficients. Let 111 be the least natural number such that Mg (x) is an integral polynomial, and let N be the least natural number such that \'li (i) is an integral polynomial. The polynomials .11g (v) and V h (x) are then primitive polynomials. Hence, according to Theorem 44, the product 111Vg (x) h (x) is also a primitive polynomial. But, since 111 Kg (x) h (x) =11 Nf (x), we must have 11= N = 1. Thus Lemma 2 is proved. Lemma 3. Let g (x) = x'R + aI
xm1 + ... + am
be an integral polynomial acith the zero.q xI, x.z, ...,
G(.r.)=xm
+.91xm1 + ... + A,,,
be the polynomial whose zeros are the n limbers 11516670 Tr;/g ie Nagell
and let
CHAPTER. V
162
.>'i, X.P. .. .,
where p I's a prime. Thc)i the tartfi(Kllt: X11. 12, ..., A. are iuteger.y, and all the
.11a1, _12(r2...., A.,,a,,, are diri..itle tg p.
Proof. By the main theorem on symmetric functions we know that every symmetric integral polynomial ill X17 x2...., xm is an integer. We now apply the polynomial theorem for calculating the expression )n
n
where the sum extends over all indices i satisfying the following conditions: I < it < i2 < < i, < in. Obviously every polynomial coefficient pl
k1! k2!
,!
.k,
+ k, = p, is divisible by p, if it is > 1. Hence we obtain an equation of the form where k1 + k2 +
( 1 '.
11,)1.
_ ( 1)' _l, + I'S (1'1, .7'2, ... ,
is a symmetric integral polynomial of the numbers xl, x2, ..., x,,, and consequently an integer. Since, by Theorem 35 aP = a, (lnod p), it follows that a,. = A,. (mod p) Q. E. D. for all v. where S (el, x2i
We shall prove the following theorem: The cyclotomic polynomial is
it indirectly. and suppose that the decomposition (1)
V?, (x) =ffi
is reducible having .t, (x),
where fi (x), .2 (r).... , (x) are irreducible distinct polynomials with rational coefficients. in which the highest power of x has the coefficient 1. By Lelnma 2 the polynomials are integral.
THE ROOTS OF UNITY
163
We first show that these polynomials are all of the same degree. Let q be a root of the equation fi (.0l. Let h1(x) be a polynomial whose zeros are the q1th powers of the zeros of fi(x). Starting from hI (x) we form a new polynomial h2 (x) whose zeros are the 92th powers of the zeros of hI (x). Continuing in this way, we obtain a sequence of polynomials ('')
h1 (xL h2
h3 (,c'),
..,
hR (x),
in which the highest power of x is supposed to have the coefficient 1. All polynomials are of the same degree as f i (x), and
CHAPTER V
164
we have h, (x) = f2 (x). They are all irreducible, since f2 (x) is irreducible. Hence, every polynomial h, (x) coincides with some of the polynomials J; (x). In the sequence (2) not all the polynoinials can coincide with fi(x), since J , (x) =J2 (x) fl (x). Let
be the first polynomial in the sequence which is t) different from ,li (x). Then the zeros off (x) are the firth powers of the zeros of fl (x). Hence, by Lemma 3, all the coefficients in the polynomial difference ,
Jl (4 J% (x)
must be divisible by the prime
But, since q,. > .M'. this is contrary to our hypothesis on the number 11I. Consequently, the polynomial cannot be reducible. Q. E. D.
48. The prime divisors of the cyclotomic polynomial.  The cyclotomic polynomials have the property in common with the polynomials of the second degree that their prime divisors are characterized by certain congruence conditions. W' a shall first establish the following main result: Theorem 94. If' q is n prime uhirh does not divide n, we have: 1.
The necessary awl sclf ticient ewidition for the co)rgruence
0 (mod q)
(1)
to be
i.,e that q = 1 (mod n).
If q = 1 (mod n), the solatioj,s of congruence (1) are the number, uhirh belun i to the exponent n modulo q. Thu., the numbe, of incongruent ..olutions niudcclo q is T(n).
If x
a .solution of congruence (1), the number F (x) is dirisible by e.i'uctllt the sane po#rer of q as x"  I Pro f: Since F (0) = 1. a solution .r of congruence (1) cannot
be  0 (niod q). If F. (x) is divisible by g, at least one of the factors in the numerator on the righthand side of relation (3) in Section 46 is divisible by q. Hence the number x"  1 is divis
ible by q. If we suppose that the solution x belongs to the exponent p modulo q, the number ,u must be a divisor of n.
THE ROOTS OF UNITY
165
Further suppose f2 > 1, and denote by PI, P2.... 'P111 the dis
tinct prime factors of ' . If q divides the number n
:r`'  1,
(2)
where d is a product of different prime factors of ii, the number
1 must be a multiple of uu and thus a multiple of d. Hence. every prime divisor of cd must belong to the set of primes 171, P2, ..., J)m
Now suppose that the number a!' no higher power of q. Thus .c" = 1
+
1
is divisible by qF and by
t q ",
where t is not divisible by q. Raising each side of this equation to the kth power, we have
xxI'=1 +ktgs
g2"f1=1 +f2q$,
where fl and t2 are integers. If k is not divisible by q, neither
is the number t2 divisible by q. Thus the number x"'  1
is
divisible exactly by the same power of q as the number x 4 4 2 and )? <Jn, the number of negative factors on the lefthand side of 4/
e Is and < is, it follows from the identity
F(x,h,hk) ( 1  x'') ... ( 1  xk 1) (1  xk) (1  x11) ... (1  x.hk+I) (1 X (1  .r.) ... (1  xhk1 (1  x^k+11 (1  xhk+2)
F (r, h, h  k) = F
h, k).
F (.r, h. 0) = F (.r, is, h) = 1,
the relation ('') is also valid for is = We have
F(x,h,k+1)=
X,
1 1
x 1  a.hk1  xh + Xhk1 hk.1
1x
 F (x, h  1, k + l)
=F(r..h1,k+ 1) xhk1
1  xk+l .. (1  xhk1)   hk1 (1  xh1) x
(1 x)... (1 xk11)
Hence (3)
F(x, is, k t 1) =F(x, h  1,k + 1) + xhk1F(x,h  1,k).
This recursive formula shows that F (.r, Is, k) is an integral poly
nomial in x of degree (h  k) k. From formula (1) we see that the highest power of x has the coefficient 1. Let us define a new polynomial f f (x, h) by the equation h
(4)
.f (.r, h) = I ( 1)k F kO
h, k).
176
CHAPTER V
Then we obtain by (3) f(x,h)=1+(1)'
'+1
h  1, k1)]
+ I ( 1)k[F(.c,h  1,k) + k=1
and
11 1)11(1
J '(x, h)
 .>!,k) F (.r, It  1.h  1).
k=1
By (1) we have x,'L.
1
1  .c
'
F(x, h 1. k  1) = F (x, h2, k  1),
thus
f(.r h)
111
lk1F x.h LI
 k1.
Finally, by (4) we obtain the recursive formula (5)
.f (:c, h) = (1  x''1) f (x, h  2).
Since f (x, 1) = 0, it follows for every odd h that J'(x, h) = 0.
On the other hand, if h is even, we have .f(x,h)_(1(1x''3)
Now
.. (12). 1=1x.
Hence, for all even h, we have established the polynomial identity (6)
,j'(x, h) _ (1  x) (1  x3) ... (1  a.r,1),
or
x''1) 11 x + (1(1 X) (1.c2)
(1  x'').(1 x''1) (1x''2) ... (1x)(1.r2)(I.Y3) + _ (1  x) (1  x3)
(1  xh1)
177
THE ROOTS OF UNITY
53. The Gaussian sums.  In his investigations on the construction of regular polygons Gauss was led to the problem of determining the sums of the following type: n1/ (in, n) _
(1)
1 cos
2nnts2 n
80
+ i sin
2mmns2 n
where in and n are integers, n > 0. After much effort he at last established the following result: Theorem 99. If n is a natural naa)nber, we have (1 + 1)1/n for n = 0 (mod 4), l/n for n = 1 (mod 4), 0 for n = 2 (mod 4), i 1 n for n= 3 (mod l)_
Proof. Let us put E = cos )a
7
 + i sin
22
For n = 2 (mod 4) the theorem is trivial, since 4
E($+* n)s = Ess+su+ 4
=  Ess.
Thus, one half of the terms in the sum (1) are cancelled out by the other half. Suppose next that n is odd, and put 'I (n  1) = v. Let in be an integer prime to n, and put Em =,q. In the polynomial identity (6) in Section 52 we then put h = n  1 and x = 112. Since 1  Elkt"
 EI'
1  E2k
for every integer t, we obtain the following relation I +922+918+7112+ ... + ,1n{nli=(1922)(1
118)...
(1
or (2)
n1 y 71kik+2) = k0
12  518870 Trygve Nagell
%1
11135 ., .  (2 R (1)2k}1 
2k1). ?1
k=0
71211+4)
CHAPTER V
178
Since
we have I.
,1k(k+1) = 1 + 9 + 274 + 279 + ... + y7rs.
77,2
k=0
Further ='1k2+,2+ (n_l) k = fvtk)s
11(nk) in L. r 1 f 12 _
22
and thus v
n,2 }1 1Ink)lnkTl) = I
r
,r V
k1
s
s+
k=1
Since
1+3+5+
. + (n  2) = r2,
it follows from (?) that 1 + 11 + 114 + Ir9 + .... 
n1,2
(113  )13) ...
+2 ).
Here the lefthand side is by definition equal to T(?)i, )I), and therefore we have } (n1) (3)
(in, n) = J1 2 d sin
(4 k  2) m n
For in = 1 this product has, by formula (5) in Section 51, the value n
Hence we see that ip (1, n) has the value Vn for n = 1 (mod 4) and the value i l i for iI  3 (mod 4). Only the case n = U (mod 4) remains. When in and n are relatively prime natural numbers and h an integer, we shall prove the leinnla: (4)
op (k in, n)
T (h n, nz) _ (k, in n).
In fact, by putting E(x) = cos 2;Zx+ i sin 2nx,
179
THE ROOTS OF UNITY
we have 97 (h in, ii) . 97 (k )7. lit) =
E(h7Ns" + hu
r
,7
an
(h (1n s + n t)`)
t
m?I 2I; (//2)
= (. (!t. m n);
L0
for by Theorem 33 the numbers ))is n t run through a complete residue system modulo )j i)2 when and t run through a complete residue system modulo in and modulo n respectively. From (4) we obtain for li = 1 and in = '? j, if ii is otld : (5)
(2 .1,
n) = 9' (n, 21)
97 (1,
)r).
If fi is even, we clearly get 7.t
t:  L
2
(V)
If 1
(7)
11
0
2., k) ¢ ('' n) _ A=O L (1Y_)
u
(2i'+1 =rp('.it) n1
By formula (6) in Section 51 we get (8)
Further
({)).4)=2(1
(9)
r'' I.
and
(10)
g2 (a, 8) = l (cos 47r
+ i sin fir! _
(1 r i) ii
Finally, for in = 2 and f = 4, we have =;:;E(Ii,2),
k =0
`
97d
kU
`
Sit
J
CHAPTER V
180
In the first sum on the righthand side the numbers (2 k + 1)2 are = 1 (mod 8), and, if t=o
t
the value of this sum is obviously `'1 t_o
an
`F
since p > 1. From this we conclude that 2
(1
j E\ 71,
when n is odd, and in is a power of 2 which is > 8. Finally, by repeated use of formulae (5). (6), (11) and (9) we obtain, if fi is even and > 2: i
x(1,2 n)=9, (1,4)],`=4._(1+1) and by repeated use of formulae (5), (7), (8), (11) and (10), if
is odd and ? 3: (1, 2i,) =9,(?, n)9'(n, 8)}i
=(1 +x')1& .
Thus Theorem 99 is completely proved. Exercises
90. Let n be a natural number, let r denote the number of distinct odd prime factors of n, and let fi be the exponent of the highest power of 2 which divides n. If a is an integer prime to n, and if \ denotes the number of incongruent roots of the congruence a2 = a (mod n), prove that
1. \ = ?r for fi = U or = 1; 2. X = 2"+1 for fl _ 2; 3. V
for 1i > 3.
This result is also true it'
)I
Suggestion: Use Theorem 47.
is a power of `? and r = 0.
THE ROOTS OF UNITY
181
91. Let n, r and fi have the same significance as in Exercise 90. If , denotes the number of incongruent quadratic residues modulo n, prove that 1. An=2'2'x2)
for fl=0 or = 1;
2.
A.n=2r() for 1S=2;
3.
f3.
This result is also true if n is a power of `? and r = 0. 4. The number n: (> 2) has a primitive root if and only if the number of quadratic residues is equal to the number of quadratic nonresidues. In all other cases the latter number is at least thrice the first number. 92. Prove Theorem 88 by direct application of Gauss's lemma (Theorem 85).
93. When p is an odd prime, determine the number of quadratic
residues r in the interval 0  1, which have the property that r + I is also a. quadratic residue. 94. Prove the relation
xI [h b]
=
(a  1) (b  1) + z (d 1),
where a and b are natural numbers and d = (a, b). 95. Prove the relation '2
[]
b(
+
l
[ a] _
[a] [
[d]
`U +
where a and b are natural numbers and d = (a, b). 96. Let vi be a natural number, and let a be a positive number such that none of the numbers ka (k = 1, 2, ..., mn) are integers. If is = [m a], prove the relation
[k a] + v [a] = nt n. k=1
x=1
182
97. Show that the polynomial x4 + 1 is never a prime function to any prime modulus. (Compare Section 29.) 98. When p is an odd prime, we define the Legendre symbol also in the case in which the numerator t is divisible by p by putting ( 1 0. )
If a and b are integers. and if a is not divisible by p, prove that
'1;(ax+L)_0 =o`
90. Let ), be an odd prime, and let f(.1.) = ax' + bx + c be an integral polynomial of the second degree, where the coefficient a is not divisible by p. Put A = L2  4 a c. As in the preceding exercise we put Prove that
(t) = 0 if I is divisible by p.
if J is not divisible by p, and further that
(a) if A is divisible by p. (Jacobsthal.) 100. Let p be an odd prime, and denote by m the number of quadratic nonresidues modulo p in the interval 0  a p. Show that
If p is of the form 4)1 + 1, we have already (in Section 38) shown that vi = 3 ()?  1). 101. Let p be a prime of the form 4 a + 3. How many quadratic
residues modulo p in the interval 0  p are even? Express this number as a function of m defined in Exercise 100.
THE ROOTS OF UNITY
183
102. How many of the quadratic residues modulo p in the in
terval 0  p are even, when p is a prime of the form
4n+1?
103. If p is an odd prime, prove the formula I:
2'4 p(1)E1)p },. x=I
2
p
where the first sum extends over all quadratic residues r modulo p in the interval 0  p. Show that this sum has the value p (p  1). if p is of the form 4 n + 1. 104. If p is a prime of the form 4)1 + 3, prove the formulae H2 sin '_r
r
p
2 sin
S
p
= lp,
where the first product extends over all quadratic residues
modulo p in the interval 0  p and the second product over all quadratic nonresidues in the same interval. Find also the value of the product lipI1
11 2 sin k2ta x=I
p
where t is an integer which is not divisible by p. The product depends on the number m in Exercise 100. 105. Prove the following theorem: If p is a prime of the form 8 11 + 1, there is in the interval 0  I/ at least one prime q which is a quadratic nonresidue of 1,. Suggestion: Use Thue's theorem. 106. Prove the following theorem: If p is a prime of the form at least one odd 8 n + 5, there is in the interval 0 prime q which is a quadratic nonresidue of p. Suggestion: Suppose it is true that every prime = 1 (mod 4) may be written as the sum of two integral squares. (Compare Section 54.) 107. Prove the following theorem: If p is a prime > 3 of the form 4 n + 3, there is in the interval 0  (2 1 p + 1) at least
CHAPTER V
184
one odd prime q which is a quadratic nonresidue of p and of the form 4 m + 3. _ Suggestion: Put a = [Vp] and consider one of the numbers p  a2, (a + 1)2  p or (a + 2)2 
108. Prove the following theorem: If p is a prime > 17 of the form 4 it + 1, there is in the interval 0  Vp at least one odd prime which is a quadratic residue of p. Suggestion: Suppose it is true that every prime = I (mod 4) may be written as the sum of two integral squares. (Compare Section 54.)
109. Prove the following theorem: If p is a prime of the form
8)1 + 7, there is in the interval 0  (2 Vp  1) at least one odd prime q which is a quadratic residue of p. Suggestion: Consider the numbers p + uo, where uo is a root of the congruence it2 = p (mod 2h), and 11 = log
Lg
+ 1.
4j
110. Let P and Q be two odd and relatively prime integers > 1, and let u denote the number of integers in the sequence
1' Q, 2 Q, 3 Q, ..., 4. (P 1) Q,
whose principal remainders modulo P are > P. Show that for Jacobi's symbol we have the following relation
=(*
(9
This result is a generalization of Gauss's lemma. Suggestion: Put B (x) = x  [x + J], and let sign x denote + 1 or 1 according as x is positive or negative. Begin
by proving the relation (P1)
(P
sign 11 R h Q` h=1
1.
THE ROOTS OF UNITY
185
111. If a and b are two natural numbers, b odd, show that for Jacobi's symbol we have the following rules:
(2a'
) b
= (it) if a = 0 or =1 (mod 4), b
and
(2a°
b
)_(a) if a=2 or =3 (mod 4). b
112. Let a, b and c be natural numbers and (a, b) = 1; suppose that b is odd and < 4 a c. Show that for Jacobi's symbol we have the following rule:
(lax
b)
(b).
113. If x and y are integers and ys > 1, show that none of the following four quotients is an integer:
4x2+1 ys+2
4x2+l y32
xe2 x2+2 2y$+3' 3y$+4
114. If p is a prime, show that the solutions of the congruence Fp_1(x) = 0 (mod p)
are the primitive roots of p. F. (x) is the cyclotomic polynomial of index n. 115. Show that the sum of the q (n) primitive nta roots of unity is equal to u (n) (MObius's function). 116. If the natural number n: has at most two distinct odd prime factors, show that the coefficients of the cyclotomic polynomial F,, (x) cannot have other values than 0, + 1 and  1.
117. Put
Fn(x,y)=ll(xey), the product extending over all the primitive nth roots of unity. For what values of n is the equation
186
ChAPTRR V
F. (x, y) = p
solvable in integers x and y, if p is a prime factor of 17? Find all the solutions x and y in these cases. 118. Let 711 and 11 be integers; suppose n > 2 and (m, n) = 1; put
11 =112 sin"' 11
the product extending, over all integers a in the interval
0  a 11 which are prime to n. Prove the following propositions:
fl = 1, if n is neither of the form p" nor of the form 2p", where p is a prime. 111
(2P )m1.
_ ( 1)1
1 rl), if n is a power of the odd prime p.
(711),
if
n
is twice a power of the odd
prime p. 7171
1/2, if
/
17
is a power of 2.
119. Let in and n be integers; suppose ii > 2 and (m, )i) = 1. Prove that
ll 2 sin kzm =
1 1 n] 1'7Z k=1
11
if n is odd, 1)tnim1i, if it is even.
120. Let y be an arbitrary positive number. Show that there are infinitely many primes p such that the least positive primitive root of p is > y. Suggestion : Use the theorem that for any natural number n there are infinitely many primes = 1 (mod !1). 15
121. Show that there are infinitely many primes p such that the exponential congruence
THE ROOTS OF UNITY
187
2Q = 1 (mod p)
has a solution q which is a prime. 122. Let n be a positive odd integer, and let m be an integer prime to na. If q, (m, n) denotes the function defined in Sec
tion 53, prove the formula q, (nz, u) =
na
(??
where r = (u  1).
, i' j n,
CHAPTER V1
D[OPHANTINE EQUATIONS OF THE SECOND DEGREE
54. The representation of integers as sums of integral squares. We shall use Thue's theorem (Section 36) for proving prime p which ix = 1 (mod 4) can be exwhere x and y are natural pressed in the form 17 =.r2 hare this property. uuinbere. No other odd 2. l:rerr/ prune p which is = 1 (mod 6) can be expressed in the form p = x2 + 3 y2, where .r and y are natural nunmbers. No other primes hare this pruperty. L'rrry prinzr p :chick is = 1 or = 3 (uiod G) can be expressed in the form p = x2 + 211, where .r and y are natural numbers. No other primes have this property. 1. Ererr/ prime p which is = 1, = if (jr = 11 (mod 14) can be
Theorem 100. 1.
j.
5.
y2,
expressed in the forma p =x 2  i a/2. where x and y are natural numbers. No other primes hare this property. Erery prime p which ix =5 or = 11 (mod 24) can be expressed in the , f bran p = 2 x2 + 3 y2, where .r and y are natural nuintbers. No other primes hare this property.
A supplement to this result is Theorem 101. If c and d are given natural there ix at most one representation of the prime p in the form p = ex2 + d y2, where x and y are natural numbers.
Proof Let us consider the congruence (1)
r2 + d m 0 (mod p).
where d = 1, 2, 3 or 7, and where p is an odd prime. From the
results in Chapter IV we have: For d = I congruence (1)
is
DIOPHANTINE EQUATIONS OF THE SECOND DEGREE
189
solvable if and only if p = 1 (mod 4); for d = 2 it is solvable if and only if p = 1 or = 3 (mod 8); for d = 3 it is solvable if and only if p = 1 (mod ti) apart from p = 3; for d = 7 it is solvable if and only if p = 1, = 9 or = 11 (mod 14) apart from p = 7. If z is a solution of congruence (1), and if the modulus is a prime p, we have by Thue's theorem (mod p),
%
where x and ij are natural numbers < 1'p: we can suppose that (x, y) = 1. Congruence (1) becomes x2
and therefore
d y2 = 0 (mod p),
22 +(Ig2=mp,
where m is a natural number < d. Hence for d = I we net ni = 1 and
.22+y2=p. For d = 2 we get m = 1 or m = 2, thus either x2 + 2 y2 =j) or x2 + 2 y2 = 2 p. By putting x = 2 x1 in the latter equation we obtain
2.0 + y2 = p.
+ 3 y2 = x2 + 3 y2 = 2 1) or x2 + 3 y2 = 3 p. The second of these equations is clearly impossible modulo 4, since 1) ; 2. By putting x = 3 r1
For d = 3 we get )n = 1, 2 or 3, thus either
x2
in the last equation we get 3.2+ y2=p.
For d = 7 we get 7n = 1, 2, 3. 4. 5, 6 or If7.m is even, both x and y must be odd, and therefore the number .r2 + 7 y2 is divisible by 8. Hence the equation .e2 + 7 y2 = in p is impossible for m = 2, 4 and 6. Since  7 is a quadratic nonresidue of the primes 3 and 5, the values m = 3 and in = 5 are also impossible. If n? = 7 we get, by putting x = 7x1, 7x4 + y2=p.
Thus the first four parts of Theorem 100 are proved.
190
CHAPTER VI
Consider next the congruence
2 a2 + 3 m 0 (mod p),
(2)
where p is a prime > 3. It is easily seen that this congruence is solvable if and only if p = 1, 5, 7 or 11 (mod 24). If z is a solution of congruence (2), we have by Thue's theorem
z = ± J (mod p),
where x and y are natural numbers < V p; we can suppose that (x, y) = 1. Congruence (2) becomes 2 x2 + 3 y2 = 0 (mod p) and therefore
2x2+3y'=mp, where m = 1, 2, 3 or 4. If m = 2, x is odd and y even and y=2yli thus x2+Gyl=1).
But this equation is possible only for p x is divisible by 3 and .r = 3.71.; thus
64 +
I (mod 8). If ))t = 3,
y2 =1),
which implies that p = ± 1 (mod 8). If m = 4, both x and y were even; but (x, y) = 1. Hence we have 2x 2 + 3!/ 2 = f),
and this equation is possible if and only if p = ± 3 (mod 8). This proves the last part of Theorem 100. We now proceed to the proof of Theorem 101. Suppose that we have the two representations of the prime p (3)
p = ex2 7 d l/2
and (4)
p = c zit + d r2,
191
DIOPHANTINE EQUATIONS OF THE SECOND DEGREE
where x. y, it and v are natural numbers. Eliminating d from these equations, we have 1) (7/2  t 2) = P (1(2 y2 c
< p, uy
(5)
rx (mod 1)).
Multiplying together equations (3) and (4), we get 2 P = (c x u ± d t/ r)2 + c cl (u y T r
(6)
where the upper or lower sign may be chosen arbitrarily. If we
suppose that n y = rx, we must have u = x and v = y, since (.c, y) = (u, r) = 1. If it r/ 79 rx, it follows from (5) and (6) that
1u+/+rxl=p, c=d=1 and exu±clyv=0; this
is possible
only for x = r and y = it. Thus Theorem 101 is proved. It is easy to verify the identity ([f2 + (1 f)t) (a2 + (l192) _ (a a  d b /3)2 + d (a i + b a)2.
By means of this and the first three parts of Theorem 100 we obtain the following results: 1.
Every integer which is the product of primes = 1 (mod 4) or twice such a product can be expressed as the sum of two integral squares.
2. Every integer which is the product of primes = 1 (mod 6) can be expressed as the sum of an integral square and thrice an integral square.
3. Every integer which is the product of primes = I or = 3 (mod 8) can be expressed as the sum of an integral square and twice an integral square. These three results were stated by Fermat; but the proof was given by Euler.
55. Bachet's theorem.  The following identity of Euler is easily verified:
192
CHAPTER VI
(a2 + b2 + C2 + (12) (a2 + #2 + y2 + 62)
=(aa+ bfl+ cy+ d6)2+ (a# ba  eb + d y)2 + (ay + bbca(1fl)2 + (ab  by + cflda)2.
(1)
We shall use it for proving Bachet's theorem: Theorem 102. Erery natural number can be cxpre,.:ed as the sum of four integral squares.
Proof. In consequence of Euler's identity (1) it is sufficient to
prove the theorem for primes. The following proof is due to Lagrange_
Lemma 1. If p is an odd prime, there exist four integers x1, x2, x3 and x4 such that
xi+xQ+x3+.x¢=reel), where m is a natural number 3, and for every Xk (k = 1, 2, 3, 4) in (4) let us choose an integer !/A such that //A = ..CA (mod u))
and 1yA < Y In. Then we get
Ai+y;+1/3+i/4x +az + a3T r}=0 (mod m) and therefore (6)
If r = 0, we would have 1/1 = 92 = J3 =Y4 = 0; the numbers xl, :r.2, x3 and xa would all be divisible by in, and we would have 2
2
2
2
But in is not a divisor of 1), since I < m < p. Hence the integer is positive. Since I t/A I < ' 111, we have from (6) ja)12f 111112I 7112+4,1112>ulr. and thus
I.
Theorem 103. If D is a natural number which is not a perfect square, there ie at least one hair of natural numbers x and y which satisfy the Diophantine equation (2)
.r2Dy2=1.
Proof. It follows from the lemma that there exists at least one integer k, different from zero, such that
.C2Dy2=k
CHAPTER VI
196
for infinitely many pairs of integers x and y. Among these pairs x, y there must exist at least two pairs !/1 and x2, y2 which satisfy the congruence conditions a'1 = '2 (mod I k j) and ?/1 = Y2 (mod I k 1).
(3)
In fact, the remainders modulo I k I of the four numbers x1, x2, 4/1 and t/2 may be combined in a finite number (=A") of ways.
Hence, we can suppose that
., Dyi=.r D!/
(4)
where xj, a/1, x2 and !/2 satisfy the conditions (3). Now we have y1
VD)
i
y2 l 1)) = x1
!/1 !/2 D + 1l1 y2  x'2 YO V D.
By (3) and (4) we get
.rla'2!/iy2Dx'i, D=U (modI1I) and
.x1112 t'2 J1xI!11x1y1 Therefore
(mod IkI).
xla'2lhN2D=kit
and
xl 112  .r2 t/1 = k i',
where it and r are integers. Hence and
(X1 A VD) (?'2 + 2 I'D) = k (it + r 1 D) y11/) (.c2  y2 Vv) = k (it  r1' D).
Multiplying together the two equations member by member we get (.1i  D 1r') (.i 2  1) 1/2) = k2
(u2  D r2).
Hence, we have
rte  D t2 = 1. Here v ,E 0. For, if v = 0, we would have x1!/2 = x2!/1, If and (., I  r/1 V I)) I.r'2
92 1
1.)) 42  !/2 VD) = ± k (.r2  92 1 '/)l.
±I
DIOPHANTINE EQUATIONS OF THE SECOND DECREE
197
Theretore after division by k x1  y1 V D = ± (x2  y2 YX
Which implies x1 = ± x2 and 111 = ± r12. But we can choose x11 74 x21. Thus Theorem 103 is proved.
The theorem was stated in 1657 by Format without proof. The first complete proof was given by Lagrange in 1768. About
50 years later it was discovered that Indian mathematicians even before 600 A. D. possessed an algorithm for solving equation (2); but they had no proof that their method always gives
a solution of the problem. The proof just given is due to Dirichlet. Commonly equation (2) is called Pell',c equation: but this is unjustified, since Pell did not make any independent contribution
to the theory of this equation. Let D and k be two integers. If ..c = it and 11= r are integers which satisfy the Diophantine equation
x2Dy2=k,
(5)
we say, for simplicity, that the number if +
is a .solution of equation (5). The two solutions it + v l D and rr' r r' 1 1) are equal if u = it'
and r = r'. The first solution is greater than the second if
n+rVD>u'+r'VD.
Let us consider all the solutions x + y VI) of the equation
x2Dy2=1
(6)
with positive and 11. Among these there is a least solution x, F y, lam, in which .r1 and all have their least (positive) values. The number Xi t y1 VD is called the fundamental solution of the .
equation (6).
A complement to Theorem 103 is Theorem 10/. If I) ix a natural ninuher which IN not a perfect xquare, the Diophantine equation (6) has infinitely many ,olu
198
CHAPTER VI
tions x + y1`D. All solutions with positive x and y are obtained by the formula x, + Y. 1'11 =
(7)
i.v the fundamental solution of (6), where n runs through all natural nwnbers, and where
where x1 + i/1 IUD
( II
rn =
)1
l
.JGk k=1
xn2k 112' Dk, 1
1
(8)
` +, 2 kT 1 Jl k1
(2 k
I.1
//
Proof Clearly it follows from (7) that
x  /n
11D
_ (.r1  YI
Then, multiplying together the corresponding members of this equation and equation (7), we have x;;  D y2 = 1.
Hence xn + yn IT) is a solution of (6). Suppose now that it + v YD were a solution with positive u
and c which is not obtainable by formula (7). Then a natural number 13 would exist such that (x1x1 + gl 1 'L)" < it  r V D < (x1 +
))n' 1
J1 1
and thus xn + yn Y D < it + v
(.i,n + Jn
i
Hence, multiplying by the positive number xn  Jn Y D, we would have (9)
1 < (u + 1, YD) (x,n  ynVL) < x1 + ?/11/D.
If we put (it + v 1rD) (x  y VD) = x t
where x = u.r  r y,, D and 1/ =
1'D,
n y, we would also have
DIOPHANTINE EQUATIONS OF THE SECOND DEGREE
199
(u  v ID) (x + ynl'D)=xyl D and, multiplying together the last two equations,
1 =(:!2Dvv2)(x2Dy2)=x2Dy2. ?1
11
Hence the number x + y 1'D would be a solution of equation (6). Then, by (9), we would have
x+y1D>1, and, on the other hand,
0<x1VD=
1
.r + y1 I)
_ it.
From this inequality it follows that u2 (x1 1)2 z D21wy2 _ (u2  N) (x2  1) or
x1+1
and finally
1
z It
n2 <  (x1 + 1) N.
This proves inequality (5); and it is easily seen that (5) implies (4).
Suppose next that the number C in (1) is negative, and put
C =  N. We
prove
Theorem 108 a. If u + r b'D is the fundamental solution of the class K of the equation (8)
it2I)v2= N, and if xl + ylYD is the funclanzental solution of equation (2), we have the inequalities
DIOPHANTINE EQUATIONS OF THE SECOND DEGREE
(9)
0