




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction to Algebra.
Typology: Summaries
1 / 139
This page cannot be seen from the preview
Don't miss anything!





























































































ii
iv
They will be able to work with Diophantine equations, i.e. polyno- mial equations with integer solutions. They will know some of the famous classical theorems and conjectures in number theory, such as Fermat’s Last Theorem and Goldbach’s Conjecture, and be aware of some of the tools used to investigate such problems.
The recommended books are
[1] H Davenport, The Higher Arithmetic, Cambridge University Press (1999)
[2] Allenby & Redfern, Introduction to Number Theory with Computing, Edward Arnold (1989)
In this section we will meet some of the concerns of Number Theory, and have a brief revision of some of the relevant material from Introduction to Algebra.
Number theory is about properties of the natural numbers, integers, or rational numbers, such as the following:
Some of these questions are interesting because properties of numbers have fascinated humans for thousands of years. On the other hand, some of them (such as primality testing and factorisation) are of very great practical importance: the secret codes that keep internet commerce secure depend on properties of numbers such as primality, factorisation, and modular arithmetic. Not all these questions will be covered in the course. But here are some prob- lems, which turn out to be closely related to one another, which we will consider. Let p be an odd prime number.
√ p^ be approximated by a rational number? For example, 2 is approximately equal to 141421/100000, but 1393/985 is an even better approximation, and has much smaller numerator and denominator. How does one find such good approximations?
1.2 Euclid’s algorithm
We will always count 0 as being a natural number. We recall that, if a and b are natural numbers and b > 0, then there exist unique natural numbers q and r such that a = bq + r, with 0 ≤ r < b. The numbers q and r are the quotient and remainder when a is divided by b. We sometimes write q = a div b and r = a mod b. If a mod b = 0, we say that b divides a and write b | a. (Note: a/b but b | a.) The division algorithm finds q and r from a and b. Euclid’s algorithm is a procedure for finding the greatest common divisor of two natural numbers a and b. It can be written as a function gcd(a, b), defined recursively as follows:
gcd(a, b) =
a if b = 0, gcd(b, a mod b) if b 6 = 0
The greatest common divisor d = gcd(a, b) is characterised by the following properties:
Example Find gcd( 225 , 157 ). Here is the calculation:
225 = 157 · 1 + 68 157 = 68 · 2 + 21
Theorem 1.2 Any natural number greater than 1 can be written as a product of prime numbers, and this expression is unique apart from re-ordering the factors.
Proof We show the existence of a factorisation into primes by induction. Given a natural number n, if n is prime, then it is the product of just one prime. (This starts the induction at n = 2, and is also part of the inductive step.) Otherwise, n has a factorisation n = ab with a, b < n. By the induction hypothesis (since both a and b are greater than 1 but smaller than n), they have factorisations into primes; putting them together we have a factorisation of n. For the uniqueness, we use the lemma. Suppose that
n = p 1 p 2 · · · pr = q 1 q 2 · · · qs,
where p 1 , p 2 ,... , pr, q 1 , q 2 ,... , qs are primes. Clearly p 1 divides q 1 q 2 · · · qs; by the lemma, either p 1 divides q 1 or p 1 divides q 2 · · · qs. Continuing, we find that p 1 divides one of the primes q 1 ,... , qs. By re-ordering them if necessary, we can assume that p 1 divides q 1 , whence p 1 = q 1 since q 1 is prime. Now we can cancel off the first factor from both sides and continue the process, until we have shown that the two factorisations are the same.
1.4 Congruences and modular arithmetic
Let n be a natural number. We say that two integers a and b are congruent modulo n if n divides a − b. We write this as
a ≡ b mod n.
Note that this is a slightly different use of the word “mod” from the one we used earlier to denote the remainder. But it is closely connected; two numbers are congruent modulo n if and only if they leave the same remainder when they are divided by n. Congruence modulo n is an equivalence relation; the equivalence classes are called congruence classes modulo n. There are exactly n congruence classes, corresponding to the n possible remainders (0, 1,... , n − 1) we could obtain when we divide a number by n. We denote by [a]n the congruence class modulo n containing a, and by Zn the set of congruence classes modulo n. The set Zn is a ring, in fact a commutative ring with identity; this means that congruence classes can be added or multiplied, by the rules [a]n + [b]n = [a + b]n, [a]n · [b]n = [ab]n,
and the usual laws (commutative, associative, distributive, identity, and additive inverse laws hold. See the Introduction to Algebra lecture notes if you need a reminder about this. Here are the addition and multiplication tables of Z 4. I have written the entries in the tables as a rather than [a] 4 to save clutter.
Proposition 1.3 If p is prime, then Zp is a field; that is, all non-zero elements have multiplicative inverses.
Proof Suppose that [a]p is a non-zero element of Zp. This means [a]p 6 = [ 0 ]p, so p does not divide a. Since p is prime, gcd(a, p) = 1. By Euclid’s algorithm, there are integers u and v satisfying ua + vp = 1. This means that ua ≡ 1 mod p, so that
[u]p · [a]p = [ 1 ]p.
So [u]p is the inverse of [a]p.
For example, take p = 157. What is the inverse of [ 225 ] 157? Our earlier calculation showed that 43 · 157 − 30 · 225 = 1, so that the required inverse is [− 30 ] 157 = [ 127 ] 157. As a consequence we prove Fermat’s Little Theorem:
Theorem 1.4 Let p be a prime number. Then np^ ≡ n mod p for any natural num- ber n.
Proof If n ≡ 0 mod p, then the conclusion is certainly true; so suppose not. Then [n]p is an element of the multiplicative group of non-zero elements of Zp. By Lagrange’s Theorem (see the Introduction to Algebra notes), the order of this element divides the order of the group, which is p − 1. So ([n]p)p−^1 = [ 1 ]p, or in other words, np−^1 ≡ 1 mod p. Multiplying both sides by n gives the result.
Exercise Prove Fermat’s Little Theorem by induction on n. (Hint: Use the Bino- mial Theorem and the fact (which you should prove) that the binomial coefficients( p k
are divisible by p for 1 ≤ k ≤ p − 1.
Fermat’s Little Theorem shows that it is possible to show that a number n is composite without finding any factors of n. If we calculate an^ mod n and the answer comes out to be different from a, then we know that n is composite.
Moreover, the solution is unique modulo ab; that is, if x 1 and x 2 are two solutions, then x 1 ≡ x 2 mod ab.
Proof Since gcd(a, b) = 1, there are integers u and v with ua + bv = 1. Now let
x = dau + cbv.
We have bv ≡ 1 mod a, and au ≡ 1 mod b. So x ≡ cbv ≡ c mod a, and x ≡ dau ≡ d mod b, as required. If x 1 and x 2 are two solutions, then x 1 ≡ c ≡ x 2 mod a and x 1 ≡ d ≡ x 2 mod b. So both a and b divide x 1 − x 2. Since a and b are coprime, ab divides x 1 − x 2 , so that x 1 ≡ x 2 mod ab as required.
This can be extended to an arbitrary number of congruences to pairwise co- prime moduli.
Example Find all numbers congruent to 2 mod 3, 1 mod 4 and 3 mod 5. The theorem shows that there is a unique solution mod 60, which can be found by trial and error, or systematically as in the proof, which we do here. Since − 3 + 4 = 1, the number − 3 · 1 + 4 · 2 = 5 satisfies the first two congru- ences. Now we look for a number congruent to 5 mod 12 and 3 mod 5. We have − 2 · 12 + 5 · 5 = 1, so the solution is − 2 · 12 · 3 + 5 · 5 · 5 = 53. So the general solution is the congruence class [ 53 ] 60 (all numbers congruent to 53 mod 60).
1.6 And finally...
Remember Euclid’s famous proof of the existence of infinitely many primes, which you will find in the Introduction to Algebra notes. It is possible to adapt Euclid’s method for other purposes. Here is an example. Note that, apart from 2, all primes are odd, and so are of one or other of the forms 4 k + 1 and 4k + 3 for some natural number k.
Theorem 1.6 There are infinitely many primes of the form 4 k + 3 for natural num- bers k.
Proof Suppose that there are only finitely many such primes, say p 1 ,... , pr. Con- sider the number n = 4 p 1 · · · pr − 1. Clearly n is of the form 4k + 3, and so it must be divisible by some prime of this form. (A number with a factor 2 is even, while a product of factors of the form 4k + 1 is itself of this form, since
( 4 k + 1 )( 4 l + 1 ) = 4 ( 4 kl + k + l) + 1.) So one of the primes p 1 ,... , pr must be a factor of n, since these are all primes congruent to 3 mod 4. But by assumption, n ≡ −1 mod p for p = p 1 ,... , pr, so none of p 1 ,... , pr can divide n. So we have a contradiction to our assumption, and there must be infinitely many primes of this form.
It is also true that there are infinitely many primes of the form 4k + 1 (and indeed, roughly equal numbers of the two forms below any given bound), but these things are more difficult to prove.
1.1 Prove that a number with a periodic decimal expansion
a 1... ak.ak+ 1... ak+l ak+l+ 1... ak+l+m
is rational. (This notation means that the digits from ak+l+ 1 to ak+l+m repeat infinitely; for example, 1. 234 = 1. 2343434.. ..)
1.2 Find gcd( 245 , 43 ) and express it in the form 245u + 43 v.
1.3 Find all integer solutions of the congruence x^2 ≡ 2 mod 17.
1.4 Let Zn denote the ring of integers modulo n. How many solutions does the equation x^2 = 1 have
(a) in Z 8 ,
(b) in Z 9 ,
(c) in Z 11?
1.5 List the prime numbers less than 100. Which of them can be written in the form x^2 + y^2 for integers x and y?
1.6 A natural number q is said to be a Carmichael number if q is not prime but satisfies the conclusion of Fermat’s Little Theorem, that is, nq^ ≡ n mod q for all integers n.
(a) Let p be a prime number, and suppose that p − 1 divides q − 1. Show that nq^ ≡ n mod p.
(b) Hence show that, if q is a product of distinct primes, and every prime p which divides q has the property that also p − 1 divides q − 1, then q is a Carmichael number.
An algebraic number is one which satisfies a polynomial with integer coefficients. From Pythagoras to the present day, a lot of number theory hae been concerned with these numbers, and in particular in trying to decide whether particular num- bers of interest to mathematics are algebraic or not.
Pythagoras and his school discovered that the square root of 2 is not a rational number. However, it is an easy number to describe geometrically: it is the ratio of the diagonal of a square to its side. The number π has a more complicated geometric description: it is the ratio of the circumference of a circle to its diameter, but there is no simple method to construct a straight line which is equal to the circumference of a given circle. (We know now, for example, that such a line cannot be constructed with the traditional geometric instruments of “ruler and compass”.) We make a distinction between algebraic numbers (which are roots of polyno- mials with integer coefficients) and transcendental numbers (which are not):
Definition Let u be a complex number. We say that u is an algebraic number if there is a non-zero polynomial f with integer coefficients such that f (u) = 0; and u is a transcendental number otherwise. Moreover, u is an algebraic integer if it is the root of a non-zero monic polynomial (one with leading coefficient 1) over the integers. Note that, if we have any non-zero polynomial over the integers, we can di- vide by the leading coefficient to get a monic polynomial over the rationals. Con- versely, given a monic polynomial over the rationals, we can multiply by the least common multiple of the denominators of the coefficients to obtain a non-zero
Theorem 2.2 The algebraic number α is an algebraic integer if and only if its minimal polynomial has integer coefficients.
Now let q be a rational number. It satisfies the polynomial x − q = 0, and clearly this is monic and has smallest possible degree, so it is the minimal poly- nomial of q. So q is an algebraic integer if and only if the coefficients 1 and −q of this polynomial are both integers, i.e. if and only if q is an integer.
One of the most important properties of algebraic numbers is the following:
Theorem 2.3 (a) Let a and b be algebraic integers. Then a − b and ab are algebraic integers.
(b) Let a and b be algebraic numbers. Then a − b, ab, and (if a 6 = 0 ) 1 /a are algebraic numbers.
I do not expect you to memorise the proof of this theorem. But it uses ideas from linear algebra, and may be useful revision of linear algebra for you. I have given the proof in an appendix to this section. The theorem can be expressed in the language of algebraic structures as fol- lows:
Corollary 2.4 (a) The algebraic numbers form a field.
(b) The algebraic integers form a commutative ring with identity.
Proof The Theorem above says that they satisfy the conditions of the subfield and subring tests as subsets of the complex numbers.
2.2 Quadratic irrationals
In this course we will be particularly interested in numbers of the form a + b
d, where a and b are rational numbers and d is a squarefree integer not equal to 1. (An integer d is squarefree if n^2 | d implies n = 1 for positive integer n. Clearly, if d were not squarefree, we could write d = cn^2 , and then a + b
d = a + bn
c.) A number of this form is called a quadratic irrational. There will be much more about quadratic irrationals later in the notes! The number u = a+b
d is an algebraic number, since it satisfies the quadratic equation u^2 − 2 au + (a^2 − db^2 ) = 0. (This is a quadratic with rational coefficients; we obtain one with integer coefficients by multiplying up by the denominators of the coefficients.) In fact, the polynomial
f (x) = x^2 − 2 ax + (a^2 − db^2 )
is the minimal polynomial of u. For it is a monic rational polynomial satisfied by u, and has degree 2; a polynomial of smaller degree would have to have degree 1, and have the form x − q, but if u satisfied this polynomial, then u = q would be a rational number. Using Gauss’s Lemma, we can now decide when a quadratic irrational is an algebraic integer.
Proposition 2.5 Let a, b be rational numbers and d a squarefree integer. Then a + b
d is an algebraic integer if and only if either
(a) a, b are integers; or
(b) d ≡ 1 mod 4 and a − 12 and b − 12 are integers.
Example ( 1 +
5 )/2 (the golden ratio) and (− 1 +
− 3 )/2 (a complex cube root of unity) are algebraic integers but ( 1 +
3 )/2 is not.
Proof By Gauss’s Lemma, we just have to show that the monic quadratic equa- tion satisfied by u = a + b
d has integer coefficients precisely in the cases given. The quadratic is x^2 − 2 ax + (a^2 − db^2 ). So the question is, when is it true that 2 a and a^2 − db^2 are integers? If 2a is even then a is an integer; if 2a is odd then a − 12 is an integer.
Suppose that a is an integer. Then db^2 is an integer; since d is squarefree, this implies that b is also an integer, since if b = m/n with gcd(m, n) = 1 then necessarily n^2 | d. Suppose that a = k + 12 , with k ∈ Z. Then a^2 = k^2 + k + 14 , so db^2 − 14 is an
integer. This means that b = l + 12 for l ∈ Z (so that db^2 has denominator 4). Then
db^2 − 14 = (l^2 + l)d + (d − 1 )/4, so we must have d ≡ 1 mod 4.
2.3 Appendix: Sums, products and quotients
In this section we prove Theorem 2.3. If a and b satisfy monic polynomials over the integers or rationals, we have to show that their difference and product do also. The direct approach is quite difficult; to convince yourself of this, try writing down a monic polynomial over the integers which has 3
3 as a root. So we need a different strategy. First, we give an equivalent characterisation of algebraic numbers and alge- braic integers, using the concept of eigenvalues from linear algebra.
Proposition 2.6 Let u be a complex number. Then