Number Theory. Lectured by V. Neale Michaelmas Term 2011

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

Part II. Number Theory. Year

Primes - Problem Sheet 5 - Solutions

MATH 361: NUMBER THEORY EIGHTH LECTURE

MATH 3240Q Introduction to Number Theory Homework 7

6 Binary Quadratic forms

PartII Number Theory

The Hasse Minkowski Theorem Lee Dicker University of Minnesota, REU Summer 2001

By Evan Chen OTIS, Internal Use

MATH342 Practice Exam

PRIME NUMBERS YANKI LEKILI

ANALYTIC NUMBER THEORY AND DIRICHLET S THEOREM

HENSEL S LEMMA KEITH CONRAD

Chapter 3. Number Theory. Part of G12ALN. Contents

Jacobi symbols and application to primality

Practice Final Solutions

MATH 2710: NOTES FOR ANALYSIS

2 Asymptotic density and Dirichlet density

MA3H1 TOPICS IN NUMBER THEORY PART III

Math 104B: Number Theory II (Winter 2012)

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

QUADRATIC RECIPROCITY

2 Asymptotic density and Dirichlet density

QUADRATIC RECIPROCITY

Number Theory Naoki Sato

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

MATH 371 Class notes/outline September 24, 2013

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

Algebraic Number Theory

The Euler Phi Function

RECIPROCITY LAWS JEREMY BOOHER

MAT 311 Solutions to Final Exam Practice

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

MATH 361: NUMBER THEORY THIRD LECTURE

MATH 371 Class notes/outline October 15, 2013

Math 314 Course Notes: Brief description

Elementary Number Theory

3 Properties of Dedekind domains

t s (p). An Introduction

QUADRATIC RECIPROCITY

Introductory Number Theory

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

MA3H1 Topics in Number Theory. Samir Siksek

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

Frobenius Elements, the Chebotarev Density Theorem, and Reciprocity

Practice Final Solutions

MATH 361: NUMBER THEORY ELEVENTH LECTURE

On the Multiplicative Order of a n Modulo n

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

I(n) = ( ) f g(n) = d n

DISCRIMINANTS IN TOWERS

GAUSSIAN INTEGERS HUNG HO

Elementary Analysis in Q p

Chapter 2 Arithmetic Functions and Dirichlet Series.

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

2 Arithmetic. 2.1 Greatest common divisors. This chapter is about properties of the integers Z = {..., 2, 1, 0, 1, 2,...}.

Mobius Functions, Legendre Symbols, and Discriminants

1 Integers and the Euclidean algorithm

Algebraic number theory LTCC Solutions to Problem Sheet 2

Summary Slides for MATH 342 June 25, 2018

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

MAS 4203 Number Theory. M. Yotov

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

MA257: INTRODUCTION TO NUMBER THEORY LECTURE NOTES 2018

SQUAREFREE VALUES OF QUADRATIC POLYNOMIALS COURSE NOTES, 2015

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

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

Almost All Palindromes Are Composite

Sets of Real Numbers

MATH 152 NOTES MOOR XU NOTES FROM A COURSE BY KANNAN SOUNDARARAJAN

Primes of the form x 2 + ny 2. Matthew Bates

Definition 6.1 (p.277) A positive integer n is prime when n > 1 and the only positive divisors are 1 and n. Alternatively

We collect some results that might be covered in a first course in algebraic number theory.

Dirichlet s Theorem on Arithmetic Progressions

Contest Number Theory

HOMEWORK # 4 MARIA SIMBIRSKY SANDY ROGERS MATTHEW WELSH

#A64 INTEGERS 18 (2018) APPLYING MODULAR ARITHMETIC TO DIOPHANTINE EQUATIONS

CHAPTER 6. Prime Numbers. Definition and Fundamental Results

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

Characteristics of Fibonacci-type Sequences

An Estimate For Heilbronn s Exponential Sum

Topic 7: Using identity types

ON FREIMAN S 2.4-THEOREM

16 The Quadratic Reciprocity Law

Elementary Number Theory

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

Quadratic Reciprocity

Introduction to Number Theory

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

p-adic Measures and Bernoulli Numbers

LECTURE 4: CHINESE REMAINDER THEOREM AND MULTIPLICATIVE FUNCTIONS

DIRICHLET S THEOREM ABOUT PRIMES IN ARITHMETIC PROGRESSIONS. Contents. 1. Dirichlet s theorem on arithmetic progressions

2 More on Congruences

A FEW EQUIVALENCES OF WALL-SUN-SUN PRIME CONJECTURE

Pythagorean triples and sums of squares

ERRATA AND SUPPLEMENTARY MATERIAL FOR A FRIENDLY INTRODUCTION TO NUMBER THEORY FOURTH EDITION

QUADRATIC RESIDUES AND DIFFERENCE SETS

1 Overview and revision

MATH 210A, FALL 2017 HW 5 SOLUTIONS WRITTEN BY DAN DORE

A review of the foundations of perfectoid spaces

Transcription:

Number Theory Lectured by V Neale Michaelmas Term 0 NUMBER THEORY C 4 lectures, Michaelmas term Page Page 5 Page Page 5 Page 9 Page 3 Page 4 Page 50 Page 54 Review from Part IA Numbers and Sets: Euclid s Algorithm, rime numbers, fundamental theorem of arithmetic Congruences The theorems of Fermat and Euler [] Chinese remainder theorem Lagrange s theorem Primitive roots to an odd rime ower modulus [3] The mod- field, quadratic residues and non-residues, Legendre s symbol Euler s criterion Gauss lemma, quadratic recirocity [] Proof of the law of quadratic recirocity The Jacobi symbol [] Binary quadratic forms Discriminants Standard form Reresentation of rimes [5] Distribution of the rimes Divergence of The Riemann zeta-function and Dirichlet series Statement of the rime number theorem and of Dirichlet s theorem on rimes in an arithmetic rogression Legendre s formula Bertrand s ostulate [4] Continued fractions Pell s equation [3] Primality testing Fermat, Euler and strong seudo-rimes [] Factorization Fermat factorization, factor bases, the continued-fraction method Pollard s method [] Official course blog: htt://theoremoftheweekwordresscom/category/lecture/ Note Text in grey indicates an aside or comment made by the lecturer For those who attended the lectures, these were the comments in yellow chalk Transcribed from a student s notes; lease let me know of corrections: glt000@camacuk Last udated: Tue 5 th Set, 07

Number Theory Lecture Definition The natural numbers are N {,,3,} Definition The non-negative integer a divides the integer b if there is an integer k such that b ka In this case we write a b read as a divides b, and we also say that a is a factor or divisor of b and that b is divisible by a If not, we write a b Definition A natural number n greater than is rime exactly when its only ositive factors are and n If n has a non-trivial factor that is, other than and n then n is comosite It is convenient to define to be neither rime nor comosite Definition The rime counting function πx counts the number of rimes less than or equal to x That is, πx #{ x : rime} Lemma Let n be a natural number greater than Then n has a rime factor Proof By induction on n For n, done Suose truefor,3,,n,andconsidern Ifnisrime thendone Ifniscomosite then n has a factor a {,3,,n } By the induction hyothesis, a has a rime factor, say But then is a rime factor of n Theorem There are infinitely many rimes That is, πx as x Remark We ll use Euclid s roof now We ll return to the distribution of the rimes later in the course Proof By contradiction Suose there are finitely many rimes, say,3,5,, Consider N 3 5 + By Lemma, N has a rime factor This rime factor can t be, or would divide N 3 5 In the same way, it can t be 3,5,, /\ Remark We don t care if N itself is rime Definition The highest common factor hcf of the natural numbers a and b is the largest integer d such that d a and d b If may be written as hcfa,b or a,b It is also called the greatest common divisor gcd Examles hcf6,5 3, hcf6,8 6 Definition If hcfa,b, say that a and b are corime or relatively rime Euclid s algorithm We find hcf7, 5 7 5 + 5 ut numbers doing same job in same lace 5 3 5 + 6 5 6 + 3 hcf is last non-zero remainder 6 3 + 0

More generally, to find hcfa,b where a > b : Divide a by b: a q b + r 0 r < b Divide b by r : b q r + r 0 r < r r q 3 r + r 3 Proosition 3 Euclid s algorithm works Proof r k q k r k + r k r k 0 r k q k+ r k + 0 Let a,b be natural numbers with a > b, and let q i and r j be obtained from Euclid s algorithm as above Then there is some k with r k 0 such that r k q k+ r k ; that is, the algorithm terminates Moreover, r k hcfa,b i The remainders r j form a strictly decreasing sequence of non-negative integers which must sto at 0 ii First, we show r k a and r k b ie, it s a common factor From the last equation, r k r k From the next u, r k RHS, so r k r k Etc So r k r, and r k b, r k a Now suose d a and d b We want d r k From the to equation, d r From the second, d r Etc So d r k Theorem 4 Bézout Let a,b,c be natural numbers There are integers m,n such that am+bn c if and only if a,b c Proof Have integers m,n such that am + bn c But a,b a and a,b b by definition, so a,b c Lecture We want to show that if c is a multile of a,b then it can be written as a linear combination of a and b Start with secial case c a,b Run Euclid s algorithm on a,b wlog a b a q b+r b q r +r r q 3 r +r 3 r k 3 q k r k +r k r k q k r k +r k r k q k+ r k +0 We know that r k a,b r k q k r k r k q k r k 3 q k r k continue substituting am+bn for some m,n Z If c a,bc then c amc +bnc is of the required form

Examle We want m,n such that 7m+5n 3 By Euclid, 3 5 6 5 5 3 5 7 5 5 7 7 5 5 7 7 6 5 Ie, take m 7, n 6 Exercise Find all solutions to 7m+5n 3 Proosition 5 Let be a rime If divides the roduct ab, then a or b In fact, one could use this roerty to define rime numbers see Number Fields Proof Avoid rime factorisations Assume ab and a We aim to show that b Since a and is rime, we have a, So by Bézout, there are integers m,n such that am+n Then ab ab m+ bn b So LHS, so RHS, so b Remark This is a good illustration of the use of Bézout Theorem 6 Fundamental Theorem of Arithmetic Let n be a natural number Then n can be factorised as a roduct of rimes in an essentially unique way ie, u to ordering This treats the factorisation of as the emty roduct or leave out Proof Existence By induction on n Exercise: see Lemma Uniqueness Suose that n k q q l, where i,q j are rimes Then q k, so by Proosition 5, q i for some i But i is rime, so q i Now cancel and reeat Get k l, and,, k and q,,q l are the same lists Definition We say that a is congruent to b modulo n, written a b mod n, exactly when n divides b a More abstract: Z is a commutative ring and nz {nm : m Z} is an ideal; the cosets of nz are the congruence classes coming from the equivalence relation Eg, [3] 7 {,, 4,3,0,7,} 3+7Z We re interested in the quotient ring Z/nZ We define [a] n +[b] n [a+b] n and [a] n [b] n [ab] n Exercise: check these are well-defined, and that we get the ring Z/nZ 3

Lemma 7 Let n be a natural number greater than and let a be an integer corime to n Then a has a multilicative inverse mod n, ie there exists m such that am mod n Proof Since a,n, there are integers l and m such that am+nl, and then am mod n Exercise If a,n > then a does not have a multilicative inverse modulo n Remark If is rime then Z/Z is a field Definition The multilicative grou modulo n, written Z/nZ or Z/nZ, is the grou of invertible elements or units modulo n We write φn or ϕn for Z/nZ this is the Euler totient function Examles If is rime then φ Z/Z And φ8 4 Remark By Lemma 7, we have φn #{a : a n and a,n } Theorem 8 Fermat-Euler Let n be a natural number greater than, and let a be an integer corime to n Then a φn mod n Remark If n, rime, we get Fermat s Little Theorem: a mod Proof Aly Lagrange s Theorem to the grou G Z/nZ We have a G, so its order divides G φn Ie, a G a φn mod n Lecture 3 We are interested in simultaneous linear congruences, such as n 7 mod 0 n 3 mod 5 or n 7 mod 0 n 3 mod 3 In, n 7 mod 0 n mod 5 n 3 mod 5 n 3 mod 5 The roblem was that 0,5 > Suose we had x 0,x 3 such that } mutually incomatible, so no solutions x 0 mod 0, x 3 mod 3 0 mod 3, 0 mod 0 Then we can in fact make any oint by a suitable linear combination Eg, n 7x 0 +3x 3 for our examle But we can find such x 0 and x 3 Since 0,3, Bézout tells us that there exist h,k such that }{{} 0h + }{{} 3k x 3 x 0 And Euclid s algorithm means we can find h and k mod 3 x 3 x 0 7,3 mod 0 4

Theorem 9 Chinese Remainder Theorem Let m,m be corime natural numbers greaterthan, and let a,a be integers Then there is a solution n to the simultaneous congruences n a mod m n a mod m and moreover this solution is unique modulo m m Proof Existence Since m,m, Bézoutgivesintegersh,k such that m h+m k Let x m k and x m h Then n a x +a x is a solution So x mod m and x 0 mod m x 0 mod m x mod m Uniqueness Suose n and n are solutions Then n a n mod m n a n mod m So m n n and m n n Since m,m, this gives m m n n That is, n n mod m m Remarks It is not difficult to extend to systems of more congruences, as long as the moduli are airwise corime ie, m i,m j if i j If the moduli are not airwise corime, then there may or may not be a solution 3 We can hrase this more algebraically: the ma Z/m m Z Z/m Z Z/m Z n n mod m,n mod m is an isomorhism of rings More generally, if n α α k k, where,, k are distinct rimes and α,,α k, then Z/nZ Z/ α Z Z/α k k Z Slogan Work modulo owers of rimes and then iece together information Corollary Let m,m be asaboveand let a,a be integerswith a,m, a,m Then there is a solution to and any such solution is corime to m m n a mod m n a mod m Proof Theorem 9 says that there is a solution Suose that n,m m > Then there is a rime such that n and m m Wlog m We have n a mod m so a But then m,a /\ So n,m m We can hrase this more algebraically: Z/m m Z Z/m Z Z/m Z 5

More generally, if n α α k k, then: Z/nZ Z/ α Z Z/ α k k Z Definition Let f : N N We say that f is multilicative if fmn fmfn whenever m and n are corime We say that f is totally multilicative if fmn fmfn for all m,n Corollary The Euler φ function is multilicative Define φ Remark φ is not totally multilicative Eg, φ4, φφ Proof Let m, n be corime Then φmn Z/mnZ Z/mZ Z/nZ φmφn It follows that if n α α k k then φn φ α φα k k Slogan Work with φ k and iece together Lemma Let be a rime and let k be a natural number Then φ k k Proof We have φ k #{a : a k and a, } We have k values to consider, and we must discard multiles of : ie,,, 3,, k There are k of these, so φ k k k We are going to be interested in d nφd Have n fixed and sum over divisors of n Examle φd φ+φ+φ3+φ4+φ6+φ d φ+φ+φ3+φ +φφ3+φ φ3 [ φ+φ+φ ][ φ+φ3 ] φd φd d 4 d 3 +++ 4 3 Lecture 4 Lemma 3 Let n be a natural number Then d nφd n Proof Let Fn d nφd Let m,n be corime Then Fmn φd d mn d m φd d since m,n d n φd φd d m d n FmFn as d,d, by Corollary So F is multilicative 6

Let be rime, and j Then j F j φ i i0 + j i i by Lemma i + + + + j j j So if n α α k k, where the i are distinct rimes, then Fn F α Fα k k α α k k n Remark The roof that F is multilicative used only the fact that φ is multilicative, so it immediately shows that if f : N N is multilicative then so is d n fd Eg, dn τn d n number of divisors of n, and σn d nd sum of divisors of n are multilicative Let s think about solutions to olynomial congruences For examle: i x + 0 mod 5 no solutions ii x 3 + 0 mod 7 three solutions 3,5,6 iii x 0 mod 8 four solutions ±,±3 The first examle shows that olynomial congruences can have no solutions The last examle illustrates that strange things can haen if we don t work modulo a rime But erhas, modulo a rime, a olynomial congruence does not have too many solutions Theorem 4 Lagrange s Theorem Let be a rime and fx a n x n ++a x+a 0 be a olynomial with integer coefficients, with a n not divisible by Then fx 0 mod has at most n solutions Remark We really do need to be rime Proof Use/adat roof from ordinary arithmetic By induction on n: n is a linear congruence we have already dealt with this Assume true for olynomials of degree n, and let f be a olynomial of degree n as above If there are no solutions to fx 0 mod then we are done, so assume that there is a solution, say x 0 Recall x j x j 0 x x 0x j +x j x 0 ++xx j 0 +x j 0 So fx fx fx 0 x x 0 gx mod, with g a olynomial with integer coefficients and degree n If fx 0 0 mod, then x x 0 gx 0 mod But Z/Z has no zero divisors it s a field, so either x x 0 mod or gx 0 mod By the induction hyothesis, gx 0 mod has at most n solutions, so fx 0 mod has at most n solutions 7

Let s think about Z/Z where is rime, and let s think about the orders of the elements of that grou We already know that they divide, but can we say more? For 7: element 3 4 5 6 order 3 6 3 6 order 3 6 #elements For 3: element 3 4 5 6 7 8 9 0 order 3 6 4 4 3 6 order 3 4 6 #elements 4 Seculation Do we always have elements of order? Are there always φd elements of order d? Theorem 5 Let be a rime Then Z/Z is cyclic Proof Aim: to show that there is an element of order Idea: show that there are φd elements of order d, for each d dividing Let S d { a Z/Z : a has order d} So Sd if d Our aim is: if d then S d φd The sets S d artition Z/Z, so d S d Suose that S d is non-emty, say a S d So a has order d Then,a,a,,a d are d distinct elements and they are solutions of x d 0 mod By Lagrange s theorem Theorem 4 there are at most d solutions to this congruence, so these are all of them So S d {,a,a,,a d } We want to know which of the elements a j 0 j d have order d Suose a j has order k Then k d Also a jk mod But a has order d, so d jk If j,d, then we get d k, and k d, so k d Is it the case that if a j has order d, then j,d? If j,d m > then a j d/m a d j/m mod, so a j has order d/m < d So S d {a j : 0 j d and j,d }, so S d φd So either S d 0 or S d φd Now d [ φd Sd ] 0 using Lemma, and φd S d 0, so in fact S d φd for all divisors d of In articular, S φ, so we have an element of order Until now our names for the elements of Z/Z usually,, were good for addition but less so for multilication We can now view elements as,a,a,,a, which is better for multilication 8

Definition If a is a generator for the grou Z/Z, then we say that a is a rimitive root modulo Lecture 5 We now study Z/ j Z Try Z/ Z This has order φ Is it cyclic? We know there is a rimitive root modulo, say a Then,a,a,,a are all different modulo, and so are different modulo But what is the order of a modulo? Sayahasorderdmodulo Then, bylagrangeorfermat-euler,d φ,thatisd Also a d mod, so a d mod But a has order modulo, so d and d, so either d or d bad ր good ր So we want a mod, and then a would be a rimitive root modulo Lemma 6 Let be a rime Then there is a rimitive root modulo, say g, such that g +b where b, So then g mod and g mod Proof By Theorem 5 we know that is a rimitive root modulo, say a If a +b where b, then we are done So suose that a mod This can haen Consider a+, which is still a rimitive root modulo Then a+ a + a +higher order terms, where the higher order terms are all divisible by So a+ a + a mod + a mod }{{} b mod since b, So a+ will do Ie, either a or a+ will do because of size, not arity ւ Lemma 7 Let be a rime greater than and let j be a natural number Then there is a rimitive root modulo, say g, such that g j mod j+ Proof By induction on j: j is exactly Lemma 6 Induction ste Suose that we have g such that g j mod j, where j But certainly g j mod j, by Lagrange or Fermat-Euler Then we have g j +b j j, where b j, 9

Then g j +b j j +bj j +higher order terms, where the higher order terms are either b j j, which is divisible by j+ for 3, or b r r j j r where r, which is divisible by j+ So g j mod j And g j +b j j mod j+, since b j, Remark The result is not true when In Lemma 6 case j, can take g 3 then g mod, g mod 4 But in case j there is no g such that g mod 4 but g mod 8 We can now study Z/ j Z for 3 Theorem 8 Let be a rime greater than, and let j be a natural number Then Z/ j Z is cyclic Proof Let g be as in Lemma 7 We shall show that g has order φ j modulo j Claim For i, g has order i modulo i Proof For i, we choose g to be a rimitive root modulo Induction ste Suose that g has order i modulo i where i Say that g has order d modulo i Then d φ i, that is d i Also, g d mod i, so g d mod i But g has order i modulo i, so i d So d i or d i But g i mod i by Lemma 7 So d i Remark The theorem is not true for For examle, Z/8Z is not cyclic,3,5,7 all have order or, so no element has order 4 Exercises What is the structure of Z/ j Z? For which n is Z/nZ cyclic? 3 If g is a rimitive root modulo, must it be a rimitive root modulo? 0

Examle We saw that 3 is a rimitive root modulo 7 it has order 6 Also, 3 6 79 +7 04 and 04,7, so 3 6 mod 7, so 3 is a rimitive root modulo 7 n for all n Lecture 6 We are interested in when the congruence x a mod n can be solved We ll start with the case that n is rime Definition Let a be corime to n If there is a solution to the congruence x a mod n then we say a is a quadratic residue modulo n Residue is too general; need word quadratic If not, then we say that a is a quadratic non-residue modulo n Examles is a quadratic residue for all n isaquadraticresiduemodulo7,since3 mod 7, butisaquadraticnon-residue modulo 5 Modulo 7, the quadratic residues are,,4, and the quadratic non-residues are 3,5,6 Question How many quadratic residues are there modulo a rime? Lemma 9 Let be an odd rime Then there are exactly quadratic residues modulo and so quadratic non-residues Proof There are at most quadratic residues since a a mod and a a mod as is an odd rime Ie, can air them off Are these the only dulicates? Suose x y mod We want that x ±y mod We have x y 0 mod x+yx y 0 mod As is rime, so x ±y mod, so there are exactly quadratic residues տ used; not true in general useful to know when two numbers have same square Proof There is a rimitive root modulo, say g For which i 0 i do we have g i a quadratic residue? If i is even, say i j, then g i g j mod, so g i is a quadratic residue Are these the only values? Suose g i x mod for some x Then x g k, say, so g i g k mod This does not imly i k Then g i k mod, and since g has order modulo, this gives i k But is even, so i k, so i Nice alication of quadratic residues So g i is a quadratic residue iff i is even

QR QR QR: a x mod b y mod QR QNR QNR a x mod ab z mod QNR QNR QR } ab xy mod } b zx mod Definition Let be a rime and let a be an integer We define the Legendre symbol as follows: a We can define χ : Examles a if a is a quadratic residue modulo if a is a quadratic non-residue modulo 0 if a, > Z/Z {,} grou under multilication a for all rimes 5, 7 a Theorem 0 Euler s criterion Let be an odd rime, and a an integer Then a a mod Proof If a 0 mod then the result is clearly true, so assume a, By Fermat s Little Theorem, a mod, so a mod By Proof of Lemma 9, we know that if x mod then x ± mod, so a ± mod Let g be a rimitive root modulo and say a g i 0 i If i j then a g j mod Thisgives solutionstothecongruencex mod, sobylagrange stheorem these are all of the solutions So { a mod if a g i, i even mod if a g i, i odd But Proof of Lemma 9 showed that g i is a quadratic residue iff i is even This gives a useful way to get a handle on a Corollary The Legendre symbol is totally multilicative That is, if is rime and a, b are integers, then a b ab Consequence: χ is a grou homomorhism

Proof If, the result is easy to check, so we assume that is odd Then a b a b ab Note: congruence, not equality ab mod by Euler s criterion a b ab But and are,0, and the only way for two of these to be congruent modulo the odd rime is if they are in fact equal Examle We can use this roerty to obtain a third roof of Lemma 9 As in the beginning of Proof of Lemma 9, there is at least one quadratic non-residue modulo, say b b a ab using total multilicativity / homomorhism a a a as b,b,, b is,,, in some order But b, so a a a a 0 a Since #quadratic residues #quadratic non-residues, we are done Corollary Let be an odd rime Then That is, { is a quadratic residue modulo if mod 4 is a quadratic non-residue modulo if 3 mod 4 Proof Aly Euler s criterion with a to get mod But and are both ±, so in this case congruence gives equality Lecture 7 We want to know about a Reminder of a roof of Fermat s Little Theorem If a is corime to, then a,a,, a are the same as,,, modulo Multily: a a a mod That is:!a! mod Since and! are corime, we have a mod Could we study a similarly? Perhas multily a,a,3a,, a Problems We d need to know what a,a,,, a are We d get! and need to cancel We want answer to be + or Where does the sign come from? 3

We could shift our attention from {0,,, } to { },,,0,,, Definition Fix an odd rime Write b for the unique integer that is congruent to b modulo and that lies in [, ] Non-standard notation We re interested in a, a,, a Examles 7, a Then a, a 3, 3a, a 4 Then a 4, a 3, 3a, 4a 5, 5a Proosition 3 Gauss Lemma Let be an odd rime, and let a be corime to Then { a ν, where ν # k : k } and ka < 0 That is, comute a, a,, a and count how many are negative Proof Consider a, a,, a Can two be the same? No, since no two of a,a,, a are congruent modulo Can two differ by a sign? No, because no two of a,a,, a sum to 0 modulo So a, a,, a are ±,±,,± in some order, where each comes with a definite sign and ν of them are negative So! a a a a! ν mod Since and! are corime, this gives a ν mod a By Euler s criterion this gives ν a mod, and since and ν both come from {+, }, this gives ν Corollary Let be an odd rime Then Proof By Gauss Lemma, a 8 ν, where ν # { b : b and b < 0 } So we must count how many of, 4,, are negative But,4,, {,,, }, so b < 0 if and only if < b, which occurs if and only if 4 < b So ν #{ b : 4 < b } We have that either 4k+ or 4k +3, for an integer k If 4k + then ν #{b : k < b k} k If 4k +3 then ν #{b : k + < b k +} k + So it seems to deend on mod 8 4

So If 8l+ then ν l is even, so If 8l+3 then ν l+ is odd, so If 8l+5 then ν l+ is odd, so If 8l+7 then ν l+ is even, so { if or 7 mod 8 ± mod 8 if 3 or 5 mod 8 ±3 mod 8 Note This is a good illustration of the way that Gauss Lemma can be used Question Let, q be odd rimes Is there a relationshi between } 8 q and Theorem 5 Law of Quadratic Recirocity Let and q be odd rimes Then That is: q q q q q q if mod 4 or q mod 4 if q 3 mod 4 Remark This hrasing includes the case q both sides are then 0 q q q? The result is sometimes hrased as this: if and q are distinct odd rimes, then q Examles 9 73 34 97 73 9 6 9 by quadratic recirocity, as 73 mod 4 as 73 6 mod 9 as 6 4 mod 9 7 97 97 97 8 7 4 3 7 7 7 3 3 97 7 multilicativity using and LQR, as 97 mod 4 as 97 mod 8 and 97 mod 7 multilicativity as 4 mod 7 and 7 mod 4 as 7 mod 3 Lecture 8 Proof of LQR Idea: use Gauss Lemma q } ν where ν # {b : b and bq < 0 We have bq bq c for unique integer c We wish to count or know arity of airs b,c Z such that 0 < b < and < bq c < 0 5

From these inequalities, we have < bq c c < bq + < q + c < q + c < q as q odd and bq c < 0 c > bq > 0 c > 0 So we are interested in airs b,c Z such that 0 < b <, 0 < c < q, and < bq c < 0 q bq c bq c 0 C A c bq q B D A number of lattice oints in the box with < bq c < 0 So we re interested in q A B number of lattice oints in the box with q < c bq < 0 So we re interested in q B Aim: we want A q B That is, we want Now, q +B A to be even q is the number of lattice oints in the box Let C number of lattice oints in the to-left triangle, and D number of lattice oints in the bottom-right triangle We have that q +B A is even iff q A+B C +D is even So if we can show that C D then we are done We can define a bijection between oints in C and oints in D, as follows: b + b, c q + c A quick check shows this works, and this comletes the roof 6

Exercise Show that if and q are odd rimes with ±q mod 4a then a In fact one can deduce this result directly from Gauss Lemma and use it to rove LQR See, eg, Davenort What haens with comosite moduli? How should we generalise the Legendre symbol? One key roerty was multilicativity, so let s try to kee that Definition Let n be an odd number and let a be an integer We define the Jacobi symbol a n as follows a q Say n k, where the i are not necessarily distinct rimes Then a a a, n where a i is the Legendre symbol If n, then the emty roduct gives a for all integers a Examles If n is rime, then the Jacobi symbol a n is just the Legendre symbol a n 5 3 5 5 3 5 3 5 3 3 3 5 0 4 5 4 3 4 5 3 Remark really imortant It is ossible for the Jacobi symbol a n to be even if a is not a quadratic residue modulo n For examle, 5, but is not a quadratic residue modulo 5 If it were, then would be a quadratic residue modulo 3, and it isn t If is true that if a n then a is a quadratic non-residue modulo n It is terribly easy to think that a n imlies a is a quadratic residue modulo n Lemma 6 The Jacobi symbol is multilicative in two senses i If n is an odd natural number and if a,b are integers, then ab n a b n n ii If m,n are odd natural numbers and a is an integer, then a mn a a m n Proof i By the definition of the Jacobi symbol and multilicativity of the Legendre symbol ii By the definition of the Jacobi symbol We studied What haens with n? k 7

Lemma 7 Let n be an odd natural number Then n n Proof and n n 8 i Say n k, where the i are not necessarily distinct rimes Say that l of the i are congruent to modulo 4, so then k l are congruent to + modulo 4 Then n k l n by result for Legendre symbol ii Say that m of the i are congruent to ±3 modulo 8, so then k m are congruent to ± modulo 8 Then m n 8 n k by result for Legendre symbol Slogan To rove a result for the Jacobi symbol, use the definition of the Jacobi symbol and the corresonding result for the Legendre symbol What haens with quadratic recirocity? Theorem 8 LQR for Jacobi symbol Let m and n be odd natural numbers Then m m n n n m Remark To hrase it as m n m n n m, we must insist that m,n are corime Lecture 9 Proof Use our slogan Let n k and m q q l, where the i,q j are not necessarily distinct rimes Then m n k m i k i k i i l qj j l j α k i definition i q j i l j α n m i multilicativity q j i q j LQR for Legendre symbol where α k i l j i q j Say r of the i are congruent to mod 4, so that k r are congruent to mod 4 And s of the q j are congruent to mod 4, so that l s are congruent to mod 4 8

Then we count in α exactly when i and q j are both mod 4, and otherwise So α rs { if r is even or s is even if r,s are both odd Examle But n mod 4 iff r is even, and m mod 4 iff s is even So α 33 73 { if m mod 4 or n mod 4 if m,n mod 4 73 33 7 33 33 7 5 7 7 5 5 by LQR, as 73 mod 4 as 73 7 mod 33 by LQR, as 33 mod 4 as 33 5 mod 7 by LQR, as 5 mod 4 as 7 mod 5 } m n Key oint: we did not use the fact that anything was rime; no need to worry about factorising Binary Quadratic Forms Question Which numbers can be exressed as the sum of two squares? That is, which numbers can be written as n x +y for some integers x,y? Definition A binary quadratic form is an exression fx,y ax +bxy +cy, where the coefficients a,b,c are integers, and we are interested in integer variables x,y We may write this f as a,b,c, and we can write f in terms of a matrix: Examles x y fx,y x +y, written as,0, or T a b/ x ax b/ c y +bxy +cy 0 0 fx,y 4x +xy+9y, written as 4,,9 or 4 6 6 9 Let s try fx,y 4x +xy +0y x+3y +y Do 4x +xy +0y and X +Y reresent the same numbers? X Put X x+3y, Y y Then Y 3 x x, so 0 y y Ah There are integer values of X,Y that don t give integer values of x,y 3 X 0 Y 9

But 4x +xy +0y x+y +x+y X Try Y x x, so y y X Y So 4,,0 and,0, reresent the same numbers Definition A unimodular substitution is one of the form X x+qy, Y rx + sy, where,q,r,s are integers with s qr X Equivalently, Y x A, where A SL y Z Reminder: the secial linear grou, SL Z { } q :,q,r,s Z, s qr r s Remark We don t allow substitutions corresonding to matrices with det Exercise Check that there are integers r, s such that 3 SL r s Z Definition We saythat two binary quadratic forms fx,y ax +bxy+cy and f x,y a x +b xy +c y are equivalent if they are related by a unimodular substitution In this case, we write f f, or a,b,c a,b,c In matrix terms, if are equivalent q SL r s Z, then a b/ b/ c and q r s Examles 4,,9,0,0 and 4,,0,0, T a b/ b/ c q r s The oint is that equivalent forms reresent the same numbers Exercise Check that equivalence of binary quadratic forms is an equivalence relation Definition The discriminant of the binary quadratic form fx,y ax + bxy + cy is discf b 4ac Examles disc,0, 4 disc4,,9 disc,0,0 0 disc4,,0 disc,0, 6 Lemma 9 Equivalent binary quadratic forms have the same discriminant Proof Say fx,y ax +bxy +cy Let q SL r s Z 0

Then f x,y ax+qy +bx+qyrx+sy+crx+sy a +br+cr x +aq +brq +bs+crsxy +aq +bqs+cs y So discf aq +brq +bs+crs 4a +br+cr aq +bqs+cs b 4acs qr But s qr, so discf b 4ac discf An alternative roof If So if f corresonds to q a b/ SL r s Z We have discf 4det b/ c q r s T a b/ b/ c q r s, then T discf q a b/ q 4det r s b/ c r s a b/ 4 det discf b/ c Lecture 0 Remark The converse is not true There are binary quadratic forms with the same discriminant that are not equivalent For examle, the forms,0,6 and,0,3 both have discriminant 4 We can see that,0,6 reresents via x,y 0, but, 0, 3 certainly does not So they are not equivalent Discriminants are useful, but don t tell us everything What numbers can be the discriminant of a binary quadratic form? Lemma 30 Thereisabinaryquadraticformwithdiscriminantdifandonlyifdiscongruent to 0 or modulo 4 Proof If d b 4ac then d b mod 4, so d 0 or mod 4 If d 0 mod 4 then it is the discriminant of,0, d 4 If d mod 4 then it is the discriminant of,0, d 4 If fx ax +bx+c has discriminant d b 4ac then 4afx 4a x +4abx+4ac ax+b +4ac b If d > 0 then fx can be either ositive or negative If d < 0 then 4afx 0 for all x Definition Let f be a binary quadratic form with non-zero discriminant We say that f is ositive definite if fx,y 0 for all x,y negative definite if fx,y 0 for all x,y indefinite if fx,y > 0 for some x,y and fx,y < 0 for some x,y Zero-discriminant is not interesting

Lemma 3 Let fx,y ax + bxy + cy be a binary quadratic form with discriminant d b 4ac and with a 0 If d < 0 and a > 0 then f is ositive definite If d < 0 and a < 0 then f is negative definite If d > 0 then f is indefinite Proof Idea: do similar as for quadratics in one variable 4afx,y 4a x +4abxy+4acy ax+by +4ac b y }{{} d i If d < 0 then 4afx,y 0 for all x,y, with equality iff x y 0 So if d < 0, a > 0 then fx,y 0 for all x,y, with equality iff x y 0 if d < 0, a < 0 then fx,y 0 for all x,y, with equality iff x y 0 ii If d > 0 then 4afx,y ax+by dy ax+by y d ax+by +y d 4a x+yb d/a x+yb+ d/a 4a x θyx φy where θ b d/a, φ b+ d/a If x y < θ and x y < φ or x y > θ and x y > φ, then the brackets have the same sign and so 4afx,y > 0 If θ < x y < φ or φ < x y 4afx,y < 0 < θ, then the brackets have different signs are so Remark It is ossible to have a form whose coefficients are all ositive but nevertheless is indefinite Eg,,3,, which has discriminant 3 4 > 0 It is also ossible to have a form where not all of the coefficients are ositive but that is ositive definite Eg,,, If a,b,c is a ositive definite form then a > 0 and b 4ac < 0, so c > 0 From now on, we shall concentrate on ositive definite binary quadratic forms We have an equivalence relation on ositive definite binary quadratic forms, so each form belongs to an equivalence class Our aim now is to find a simle reresentation of each equivalence class Let s think about 0,34,9 The middle coefficient is very large can we decrease it? Try the substitution T ± corresonding to the matrix ± 0 T a b/ b/ c ± 0 0 ± ± This sends 0 a b/±a b/ c±b/ a b/ to b/ c a b/±a b/±a a±b+c

So a,b,c T± a,b±a,a±b+c So 0,34,9 T 0,4,5 T 0, 6, Try substitution S, corresonding to 0 0 T a b/ b/ c So a,b,c S c, b,a 0 0 0 This sends 0 a b/ to b/ c 0 b/ a 0 c b/ c b/ b/ a So 0, 6, S,6,0 T,4,5 T,, T,0, We could aly S,T ± in different orders Try this at home! Can ensure a c via S Can ensure b a via T ± Definition We say that the ositive definite binary quadratic form a, b, c is reduced if either a < b a < c or 0 b a c Lemma 3 Every ositive definite binary quadratic form is equivalent to a reduced form Lecture Proof We have unimodular substitutions, S : a,b,c c, b,a T ± : a,b,c a,b±a,a±b+c If a > c, use S to decrease a while keeing b fixed If a < c and b > a, then use T + or T to decrease b while keeing a fixed Reeat these stes as long as necessary Each ste decreases a+ b while keeing it ositive, so this algorithm must sto So we see that our original form is equivalent to a,b,c with b a c If b a, then we can aly T + to make the middle coefficient +a while leaving the others unchanged If a c, then aly S if necessary to ensure the middle coefficient is non-negative Can two reduced forms be equivalent? We saw an examle of,0,6 and,0,3 These are both reduced forms of discriminant 4 but not equivalent More generally, if fx,y ax + bxy + cy is reduced, what can we say about the small numbers it reresents? We have What if neither variable is 0? f0,0 0, f,0 a, f0, c 3

Lemma 33 Let fx,y ax +bxy +cy be a reduced ositive definite binary quadratic form Then the smallest integers reresented by f for corime x,y, or x y 0, are 0, a, c, and a b +c, in that order Proof We have and since f is reduced, we have 0 < a c f0,0 0, f,0 a, f0, c, If x 0, the corimality condition forces y ± Likewise if y 0 If x y > 0, then fx,y ax +bxy +cy ax b x y +cy a x b x +c y a b x +c y a b +c Similarly, if y x, then fx,y a b +c We can achieve equality, eg f,± gives a b +c choose sign deending on sign of b Since f is reduced, we have a b +c 0 We can then use this to comare reduced forms Theorem 34 Every ositive definite binary quadratic form is equivalent to a unique reduced form Proof By Lemma 3, every such form is equivalent to some reduced form It suffices to check that no two reduced forms are equivalent Suose that fx,y ax +bxy+cy and f x,y a x +b xy+c y are equivalent reduced forms We aim to show a a, b b, c c By Lemma 33, the smallest non-zero integer reresented by f is a, and that by f is a So a a We have f±,0 a, f0,± c and f ±,0 a, f 0,± c as the smallest non-zero values reresented by corime x, y So the four airs ±,0 and 0,± for f must corresond to four airs for f, so we have c c Since f f, they have the same discriminant So b 4ac b 4a c b 4ac, so b b and hence b ±b If b 0 then we re done If b > 0 can a,b,c and a, b,c both be reduced? If they are both reduced, then a < c if a c then middle coefficients must be non-negative b < a cannot have b a 4

So 0 < a < c < a b +c So fx,y a iff x,y ±,0 fx,y c iff x,y 0,± So±,0foroneformmustcorresondto±,0fortheother, andlikewisefor0,± If the two forms are equivalent via the substitution q SL r s Z, then we have and But s qr, so x y ± q ± ±, so ± and r 0, 0 r s 0 ±r 0 q 0 ±q, so q 0 and s ± ± r s ± ±s q x, where r s y q 0 ±, so b b, so b 0 r s 0 So we have a unique reresentation of each equivalence class of ositive definite binary quadratic forms Question How many reduced forms are there with given discriminant? Examle d 4 Want a,b,c such that b 4ac 4 and b a c Not exactly the condition for reduced forms, but a good start If a, b, c satisfies these conditions, then 4 b 4ac ac 4ac 3a So a 8, so a Also, b 4ac b 0 mod 4, so b is even a Want b 4c 4 Since b is even and b a, the only ossibility is b 0, which gives c 6, and,0,6 works a Want b 8c 4 If b 0, then c 3, and,0,3 works If b, then 4 8c 4, so no integer solutions So the only reduced forms with discriminant 4 are,0,6 and,0,3 Proosition 35 Let d be a fixed negative integer Then there are finitely many reduced forms with discriminant d Proof We want a,b,c such that b 4ac d and b a c Reduced form is quicker Then d b 4ac ac 4ac 3a, so a d/3 So there are finitely many ossibilities for a But b a, there are finitely many ossibilities for b And c b d/4a, so is determined by a,b and d 5

Definition Let d be a negative integer The class number of d, denoted by hd, is the number of reduced forms of discriminant d Equivalently, it is the number of equivalence classes of ositive definite binary quadratic forms of discriminant d Examle h 4 Remarks Proosition 35 gives existence for hd and a way to comute it, although it may take a while The class number will aear in the Number Fields course too ** Non-examinable section ** We might ask what are the discriminants d with a certain class number hd What haens to hd as d? A conjecture of Gauss: hd as d This is known as Gauss class number roblem This has led to a lot of interesting number theory Eg, what are the discriminants with class number? There are just 9 Generalised Riemann Hyothesis GRH hd as d 905 And in 930, GRH false hd as d Lecture End of non-examinable section x Lemma 36 Let y q r s x y, where q SL r s Z Then x,y are corime iff x,y are corime Proof If x,y have highest common factor d, then x x+qy and y rx+sy are both divisible by d So if x,y then x,y We have x y immediately from above q x r s y, with q SL r s Z So it follows If x,y are both divisible by d > then fx,y will be divisible by d, so we will concentrate on corime x and y Definition Letf beabinaryquadraticformandnbeaninteger Wesaythatf reresents n if fx,y n for some integers x,y We say that f roerly reresents n if fx,y n for some corime integers x,y Remark We know that equivalent forms reresent the same numbers Lemma 36 shows that equivalent forms roerly reresent the same numbers Fix n Which forms roerly reresent n? Fix f Which numbers are roerly reresented by f? Which forms roerly reresent? 6

If the first coefficient of f is then f,0, so f roerly reresents So any form equivalent to a form with first coefficient must also roerly reresent Is that all? That is, if f is a binary quadratic form that roerly reresents, must it be equivalent to a form with first coefficient? Say fx,y, where x,y are corime Does x,y corresond to,0 under a unimodular substitution? If so, then f is equivalent to a form f with f,0 fx,y So, is there a matrix q x q SL r s Z such that? y r s 0 r Put x, r y Can we solve xs qy? Yes, by Bézout, since x,y corime Lemma 37 Let n be a natural number Then n is roerly reresented by a form f iff f is equivalent to a form with first coefficient n Proof If f is equivalent to f, where f has first coefficient n, then f,0 n, so f roerly reresents n, so f roerly reresents n If fx,y n, where x,y are corime, then there are integers q,s such that xs qy, by Bézout x So then y x q, where y s 0 x q SL y s Z So f is equivalent to a form f with f,0 fx,y n, and therefore f has first coefficient n Which numbers are reresented by x +xy +y? From Lemma 37, we see that n is reresented iff there is a form with first coefficient n that is equivalent to,, When are there b,c such that n,b,c,,? If n,b,c,, then n,b,c has discriminant b 4nc 3, so b 3 mod 4n What haens if we know that there is a solution to this congruence? Then there are integers b,c such that b 4nc 3, so that n,b,c is a form with discriminant 3 But we do not know that n,b,c,, All we know is that n,b,c is equivalent to a reduced form of discriminant 3 What are they? We want A,B,C such that B 4AC 3 and B A C Then 3 B 4AC 3A, so A, so A Then B satisfies B and B 3 mod 4 So B odd, but B A, so B Then C B + 3/4A So the only reduced form of discriminant 3 is,,, ie h 3 So every ositive definite form of discriminant 3 is equivalent to,, So there is a form n,b,c,, iff there is a solution to w 3 mod 4n 7

Theorem 38 Let n be a natural number Proof any form ւ i Suose that n is roerly reresented by a form of discriminant d Then there is a solution to the congruence w d mod 4n ii Suose that there is a solution to the congruence w d mod 4n Then there is a form of discriminant d that roerly reresents n տ some form, we can t choose it i Say n is roerly reresented by f of discriminant d Then f is equivalent to a form f with first coefficient n, by Lemma 37 Say f x,y nx +b xy +c y Then f has the same discriminant as f, so b 4nc d, so b d mod 4n ii Suose that there is a solution to the congruence w d mod 4n Then there are integers b,c such that b d+4nc Then n,b,c is a form of discriminant d, and it roerly reresents n Examle Which natural numbers can be roerly reresented as the sum of two squares? Put fx,y x +y, ie the form,0, By Theorem 38, if n is roerly reresented by,0, then there is a solution to w 4 mod 4n, and if there is a solution to this congruence then n is roerly reresented by some form of discriminant 4 What are the reduced forms of discriminant 4? We want a,b,c such that b 4ac 4 and b a c So 4 3a, so a 4/3, so a And b must be even, so b 0 And c b +4/4a, so,0, is the only reduced form of discriminant 4 So Theorem 38 tells us that n is roerly reresented by,0, iff there is a solution to w 4 mod 4n This haens iff there is a solution to v mod n Caution Take care with n as it s a Jacobi symbol This congruence having a solution is not the same as n Lecture 3 We see from Theorem 38 that if we want to know which numbers are roerly reresented by which forms, then it would be a good idea to study the congruence w d mod 4n More recisely, for fixed d and n we want to know whether this congruence has a solution Examles The natural number n is roerly reresented by the form x +xy +y iff there is a solution to w 3 mod 4n The natural number n is roerly reresented by the form x + y iff there is a solution to v mod n The key oint in each case is that the class number is, ie there is only one reduced form with the right discriminant 8

What can we say about w 3 mod 4n? Let s study the case when n is an odd rime By the Chinese Remainder theorem there is a solution to w 3 mod 4 iff there is a solution to w 3 mod 4 w 3 mod There is clearly a solution to w 3 mod 4, namely w So we can concentrate on w 3 mod This has a solution iff or 3 Now 3 3 3 mod 3 3 by Corollary and LQR 3 So an odd rime is roerly reresented by,, iff 3 or mod 3 This time we study v mod n Focus on the case when n is rime Then v mod has a solution iff, and this haens iff or mod 4 So the rime is roerly reresented by,0, iff or mod 4 What haens with v mod j? If this has a solution then there is a solution to v mod What about the converse? There is a fairly general result that will be helful here Proosition 39 Hensel s Lemma Let f be a olynomial with integer coefficients, and let be an odd rime Suose there is x such that fx 0 mod and f x 0 mod Then for each r, there is x r such that fx r 0 mod r Slogan If we have a suitable solution modulo, then we can bootstra it to a solution modulo r Surrising! Proof We shall show, by induction on r, that there is x r such that fx r 0 mod r and x r x mod so that f x r 0 mod Case r : this was recisely the suosition in the statement Inductive ste Suose we have x r such that fx r 0 mod r and x r x mod, so that f x r 0 mod Here, r Then fx r k r for some integer k Consider x r x r +λ r, where λ is an integer If fx r 0 mod then fx r 0 mod r 9

Then clearly x r x r x mod We have Taylor series, higher order terms are divisible by r fx r fx r +λ r and so by r ւ fx r +λ r f x r mod r r k +λf x r mod r So fx r 0 mod r iff k +λf x r 0 mod Since f x r 0 mod, it has a multilicative inverse, so we can solve for λ We are interested in the case fx x +, so f x x Hensel s Lemma cannot hel here when, but should hel for odd rimes Let be an odd rime Then v mod has a solution iff mod 4 Using Hensel s Lemma, if mod 4, then there is v such that v mod and v 0 mod So for j there is a solution to v mod j What haens when? Clearly there is a solution to v mod If j, then a solution to v mod j would give a solution to v mod 4, which does not exist So we have roved: Theorem 40 The natural number n can be written as the sum of two corime squares iff n is not divisible by 4 and all odd rime factors of n are congruent to modulo 4 Summary of roof n is roerly reresented by,0, iff there is a solution to w 4 mod 4n by Theorem 38, since,0, is the only reduced form of discriminant 4 This haens iff there is a solution to v mod n 3 Let n α α α k k, where i are distinct odd rimes, α 0, and α i for i k Then there is a solution to v mod n iff there is a solution to v mod α v mod α Chinese Remainder Theorem v mod α k k 4 There is a solution to v mod i iff i mod 4 5 There is a solution to v mod αi i iff there is a solution to v mod i 6 There is a solution to v mod α iff α {0,} 30

Corollary 4 The natural number n is a sum of two squares iff each rime congruent to 3 modulo 4 occurring in the rime factorisation of n occurs to an even ower Proof We know that n is the sum of two squares iff it is the roduct of a square and a number that is a sum of two corime squares Remarks One can classify sums of three squares Other roofs of Corollary 4 are available Theorem 4 Lagrange Every natural number is a sum of four squares Surrising! Lecture 4 The Distribution of the Primes In Lecture we saw Euclid s roof that there are infinitely many rimes We have results such as: There are infinitely many rimes congruent to 3 modulo 4 see examles sheet There are infinitely many rimes congruent to modulo 4 see Numbers & Sets Can we generalise this? Clearly we cannot show that there are infinitely many rimes congruent to modulo 4, or more generally to a modulo n where a,n > But what haens if a,n? Are there infinitely many rimes congruent to a modulo n? Things in favour: We have some examles All rimes lie in φn residue classes corime to n with finitely many excetions, and there s no obvious reason why one class should be more oular than another Theorem 43 Dirichlet s theorem on rimes in arithmetic rogressions Let n be an integer greater than, and let a be a natural number corime to n Then there are infinitely many rimes congruent to a modulo n Putting this another way, there are infinitely many rimes in the arithmetic rogression a,a+n,a+n,a+3n, Slogan If there is not an obvious reason why there are not infinitely many rimes congruent to a mod n, then there are Proof Not roved in this course so don t use it unless you have to But we shall see a small hint of an idea of a roof We have a successful strategy: Want: there are infinitely many rimes with some roerty eg, in some congruence class Suose only finitely many, and aim for contradiction 3

Do something clever to find a number with a rime factor that also has this roerty Check that this rime is not on the original list contradiction The something clever seems to deend heavily uon the roerty in question, which makes it hard to see how we might use this strategy to rove a more general result We need another strategy for showing that there are infinitely many rimes We ll see an aroach attributed to Euler, namely to study the sum of recirocals of rimes, How do we exect this to behave? We know that /n converges and /n diverges What will haen to /? Proosition 44 For x 0, we have x only interested in large x loglogx not imortant Remark With a bit more work, one can show that x/ loglogx+c+o/logx as x, for some constant c So x / diverges, but more slowly than nx /n Proof Idea: look at log x + + + This includes x/, lus other terms which we hoe are small We have: x + + + x n nx x+ logx y dy 3 x x+ Also we have: log [ ] log 3 3 + + + + 3 + 4 + / 3

Summing over x, we have: [ log ] x x x n n nx x So loglogx x log [ x ] x So x loglogx Corollary 45 There are infinitely many rimes To rove Dirichlet s theorem, one can show that x a mod n as s from above s One needs a way to ick out rimes in this congruence class, and can do this using Dirichlet characters We shall not say more about this We know that all but finitely many rimes lie in the φn residue classes corime to n Are they evenly distributed? Look at #{ : rime, x, a mod n} There are some results and one notable conjecture that is still oen the Elliot-Halberstam conjecture Roughly seaking, these sets all have aroximately the same size Let s return to the rimes in general, and to πx which counts the rimes x Examles sheet : πx logx loglogx We can get a slightly better bound using an idea of Erdős Proosition 46 There is a constant c > 0 such that πx c logx Proof If y x then we can write y m α α k k, where m x, and,, k are the rimes x so k πx, and each α i is 0 or so α α k k is square-free There are x ossibilities for m, and k ossibilities for α,,α k So x #{y : y x} x πx So πx x, and so πx logx log 33

Lecture 5 Definition We define the Riemann zeta function ζ as follows For a comlex number s with Res >, we ut ζs n s n In this context, one conventionally writes s σ +it Lemma 47 For Res >, the series n /ns converges absolutely Moreover, it converges uniformly on Res +δ for any δ > 0, and so it is analytic on Res > Proof For s σ +it we have: n s n σ+it e σ+itlogn e σlogn n σ So /n s /n σ But n /nσ converges for σ >, and converges uniformly for σ +δ We can see a link between ζ and rime numbers in the following result Proosition 48 Euler roduct for ζ For Res >, we have ζs s, where the roduct is over all rimes Proof Intuitive idea: s + s + s + n s n Fundamental Theorem of Arithmetic Fix s with Res > If M > logn log, then M > N for any rime So M js equals + s + N s lus some other terms n s for n N N j0 Terms are all distinct by the Fundamental Theorem of Arithmetic So n s M js n N j0 nn+ n s nn+ n σ cn σ, for some constant c > 0 This bound is uniform in M, so taking M, we get ζs s cn σ N But N σ 0 as N since σ > So ζs s Remark This is linked to the study of x/ Proosition 44 where we looked at the roduct x 34

It is imortant to know the location of the zeros of ζ, that is, the values of s for which ζs 0 We can say something about this now Lemma 49 If Res > then ζs 0 Proof For Res > we have that ζs s Clearly each factor is non-zero, but it s an infinite roduct so we re not sure So x s 0 for any natural number x We have ζs x s >x s This is lus the sum of terms n s where n has a rime factor greater than x So ζs x s nx+ n σ for large enough x տ tail 0 as x So ζs s 0 It turns out that we can extend ζ to the whole of C using analytic continuation One can extend ζ to Res > 0 using an integral Then ζ turns out to be meromorhic, with a simle ole at s We define the Gamma function to be Γz 0 e t t z dt, for Rez > 0 This can be continued to a meromorhic function on C with simle oles at z 0,,, and nowhere else, and with no zeros The function satisfies zγz Γz So in articular, for a natural number n we have Γn n! We define the comleted ζ function to be Ξs π s/ Γs/ζs It turns out that Ξ satisfies the functional equation Ξs Ξ s In this way we can extend ζ to the whole of C It has just one ole, namely a simle ole at s, with residue It has trivial zeros at s, 4, 6, Since ζs 0 for Res >, the functional equation tells us that any further zeros of ζ lie in the critical stri 0 Rez In order to rove the Prime Number Theorem, mathematicians roved that ζs 0 on the line Res In fact, we know that there is a zero-region for ζ in the critical stri, and this allows us to rove better error terms in the Prime Number Theorem The Riemann Hyothesis asserts that in fact all the zeros of ζ in the critical stri lie on the line Res Famous oen roblem! The Möbius function µ : N {,0,} is defined by { k if n µn k is a roduct of k distinct rimes 0 if n is not square-free Exercise Show that µ is multilicative Note µ 35