Professional Documents
Culture Documents
537 Threor
537 Threor
Ed Belk
Fall, 2014
1 Week One
R = {b − an : n ∈ N0 } ∩ N0 .
By the well-ordering axiom, R has a least element r, and we define q to be the nonnegative integer q such that
b − aq = r. Then b = aq + r and r ≥ 0; moreover, if r ≥ a then one has
1
Now, suppose q 0 and r0 are such that we have
b = aq + r = aq 0 + r0 .
but 0 ≤ r − r0 ≤ r < a, and so the above equation is a contradiction unless r − r0 = 0, and the result is
immediate.
Greatest Common Divisor: Given any two integers a and b not both equal to zero, we define their greatest
common divisor (commonly abbreviated gcd) to be the largest d ∈ N such that d|a and d|b; we write d = (a, b).
Note that because a and b each have only finitely many divisors, the gcd is always well-defined.
Theorem 1.1.1 Let a, b ∈ Z, not both equal to zero. Then:
1. (a, b) = min S, where S = ({ax + by : x, y ∈ Z} ∩ N), and
2. For any c ∈ Z such that c|a and c|b, we have c|(a, b).
The existence of integers x, y so that ax + by = (a, b) as in part (1) is known as Bézout’s identity.
Proof : 1. Let m = min S, with u and v such that m = au + bv, and let g = (a, b); note that m ≤ a. Since g|a
and g|b, we know from the properties of divisibility that g|m and so g ≤ m. Now, if m - a then by the division
algorithm we may write a = mq + r with 0 < r < m, and thus
and we deduce that r ≥ m = min S, a contradiction; thus m|a. In the same fashion we show m|b, and so by
definition m ≤ (a, b) = g, and we are done.
2. If c|a and c|b, then we know c|(ax + by) for every x, y ∈ Z, and in particular for those u, v such that
(a, b) = au + bv, whose existence is guaranteed by part 1.
2
1.2 Lecture Two
Recall: Bézout’s identity states that (a, b) is the smallest positive integer that may be written ax + by, where
x, y ∈ Z.
Proposition 1.2.1 For a, b ∈ N, one has (ma, mb) = m(a, b).
a
Corollary 1: If d|a, d|b, then ad , db = d1 (a, b); in particular, (a,b) b
, (a,b) = 1.
ax + by = k ⇒ (a, b)|k.
3
9 = 3 · 3 + 0 ⇒ (9, 3) = (3, 0) = 3.
Thus (537, 105) = 3.
Notation: The least common multiple of a and b is denoted lcm(a, b) or, more commonly, [a, b].
Exercise: Show that (a, b)[a, b] = ab.
§1.3 – Primes
Definition: A natural number n is called prime if it has exactly two divisors. n is called composite if there
exists some d with 1 < d < n such that d|n. The integer n = 1 is neither prime nor composite.
Notation: Unless otherwise stated, p will denote a prime number.
Lemma 1.2.5 (Euclid’s lemma) If p|ab, then p|a or p|b.
Proof : Suppose p - b. Then (p, b) = 1, and so by theorem 1.2.4 we know that p|a.
Theorem 1.2.6 (The Fundamental Theorem of Arithmetic) Every n ∈ N, n > 2 may be written as the product
of primes; moreover this expression is unique up to reordering of the factors.
Proof : (existence) We use strong induction. The case n = 2 is trivial from the definition of a prime, therefore
suppose n > 2. If n is prime we have the trivial factorization n = n, otherwise we may write n = ab, with
1 < a < n and 1 < b < n. By the inductive hypothesis we may write a = p1 p2 · · · pk , b = q1 q2 · · · ql , with each
pi , qj prime, and the result is immediate.
(uniqueness) Let n ∈ N and suppose we have
n = p1 p2 · · · pk = q1 q2 · · · ql , each pi , qj prime.
Since p1 |q1 q2 · · · ql we have by lemma 1.2.5 that p1 |q1 or p1 |q2 · · · ql . Repeating this process as many times as
necessary, we find qt such that p1 |qt , and by relabelling the qj if necessary we will assume t = 1. Since p1 6= 1
this implies that p1 = q1 , as q1 has no other factors. We then cancel p1 = q1 on both sides of the equation and
we have
p2 p3 · · · pk = q2 q3 · · · ql .
We apply the same argument to this expression to obtain p2 = q2 , p3 = q3 , and so on; it follows that k = l, and
we are done.
4
2 Week Two
which (since 1 < pj ) by lemma 2.1.1 implies that pj - N for any j. Thus we deduce that p 6= pj for any
j = 1, 2, . . . , k, and therefore that the set of primes {p1 , p2 , . . . , pk } is not exhaustive.
5
§2.1 – Congruences
Definition: Let m ∈ Z, m 6= 0. Given a, b ∈ Z, we say that a is congruent to b modulo m, written
a ≡ b mod m, if m|(b − a). For example, we have
In general, a residue class modulo m is of the form {a + km : k ∈ Z}. Note in particular that a ≡ b mod m if
and only if a and b have the same remainder when dividing by m.
Lemma 2.1.4 Suppose a ≡ b mod m, c ≡ d mod m. Then:
1. If d|m then a ≡ b mod d,
2. a + c ≡ b + d mod m,
3. ac = bd mod m.
Proof : We prove only (3), as the others are clear from the definitions: since m|(b − a), m|(c − d), we must have
that m divides c(b − a) + b(d − c) = bd − ac, and the result follows.
The last two parts of lemma 2.1.4 imply further that a − c ≡ b − d mod m, and more generally, if f (X) ∈
Z[X], then f (a) ≡ f (b) mod m whenever a ≡ b mod m. In particular, we have that ak ≡ bk mod m for any
k ∈ N.
Question: If j ≡ k mod m, do we have aj ≡ ak mod m?
In general, no: some counterexamples include a = 2, m = 3 or a = 2, m = 4.
We have seen that the operations of addition, subtraction, and multiplication behave well with respect to
congruence modulo m; does division? Again, in general the answer is no:
6
m a m a
Proof : Suppose ax ≡ ay mod m so that m|a(y−x); then we have (a,m) | (a,m) (y−x), and since (a,m) , (a,m) =1
m m m m
we know that (a,m) |(y − x), hence x ≡ y mod (a,m) . Now, suppose x ≡ y mod (a,m) so that (a,m) |(y − x). Then
m a
we certainly have a (a,m) |a(y − x), hence (a,m) m|a(y − x) and so in particular m|a(y − x), and we are done.
Definition: Given m ∈ Z, m 6= 0, a complete residue system modulo m is a set containing exactly one
element from each residue class modulo m. For example, with m = 5 we may take any of the sets
{0, 1, 2, 3, 4}, {1, 2, 3, 4, 5}, {−2, −1, 0, 1, 2}, or {−17, 60, 101, 12, −111}.
A reduced residue system is a set of representatives from all residue classes relatively prime to m; continuing
in the same example, we may take
7
2.2 Lecture Four
Recall: A reduced residue system modulo m is a set consisting of exactly one element form each
residue class modulo m whose elements are relatively prime to m; these are called reduced residue classes.
Equivalently, we may take any complete residue system modulo m, and discard all elements d such that
(d, m) > 1.
Example: If m = 10, a complete residue system is given by {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; by discarding all elements
not relatively prime to 10, we obtain the reduced residue system {1, 3, 7, 9}. If m is prime, a reduced residue
system is given by {1, 2, . . . , m − 1}.
Definition: The Euler φ-function (or Euler totient function) is the function which assigns to m ∈ N the
cardinality of a reduced residue system modulo m; that is,
By theorem 2.1.5, we may cancel a (which is relatively prime to the modulus) to yield the congruence
ri ≡ rj mod m,
and hence (since we began with a reduced residue system) we know that i = j, and the result is immediate.
Theorem 2.2.2 (Euler’s theorem) If (a, m) = 1, then aφ(m) ≡ 1 mod m.
Proof : Let {r1 , r2 , . . . , rφ(m) } be a reduced residue system modulo m. Then by lemma 2.2.1, the elements
ar1 , ar2 , . . . , arφ(m) are congruent (in some order) to the elements r1 , r2 , . . . , rφ(m) , and therefore
Since (r1 r2 · · · rφ(m) , m) = 1, we may cancel it, and the result follows.
Corollary 1: (Fermat’s little theorem) If p is prime and p - a, then ap−1 ≡ 1 mod p, and for all a ∈ Z one has
ap ≡ a mod p.
Corollary 2: Let (a, m) = 1. If there exist e and f with e ≡ f mod φ(m), then ae ≡ af mod m.
For example, 537 ≡ 1 mod 4, and since 4 = φ(10) we have that 3537 ≡ 31 mod 10.
8
Proof : Suppose without loss of generality that f ≥ e and write f = e + kφ(m). We have
as claimed.
Definition: Given a, m ∈ Z with m 6= 0, we call x ∈ Z a (multiplicative) inverse of a modulo m if
ax ≡ 1 mod m.
Theorem 2.2.3 (Theorem 2.9, Niven) If (a, m) > 1, then a has no inverse modulo m. If (a, m) = 1, then
there exists a unique reduced residue class modulo m which contains all inverses of a. We denote any such
inverse as ā or a−1 .
Note that the notation a−1 is justified, as for example if we define a−k to be (a−1 )k mod m, then we indeed
have (ak )−1 = (a−1 )k .
Proof : Let g = (a, m); note that if ax ≡ 1 mod m then ax ≡ 1 mod g, and since g|a this congruence becomes
0x ≡ 1 mod g, a contradiction unless g = 1. Thus with the assumption that g = 1, we first prove uniqueness:
if
ax ≡ 1 mod m and ay ≡ 1 mod m,
then ax ≡ ay mod m, hence (since (a, m) = 1) x ≡ y mod m, as claimed. To show existence, we give two short
proofs:
(1) By Euler’s theorem, we have 1 ≡ aφ(m) mod m ≡ a · aφ(m)−1 mod m, so we may take a−1 = aφ(m)−1 .
(2) Since (a, m) = 1, there exist integers u, v such that au + bv = 1. Taking this equation modulo m yields the
congruence au ≡ 1 mod m, and so we may take a−1 = u.
9
2.3 Lecture Five
Calculating inverses: Suppose we want to calculate the (multiplicative) inverse of 9 modulo 20; note that
this calculation is well-defined, as (9, 20) = 1. We perform the Euclidean algorithm:
20 = 9 · 2 + 2; 9 = 2 · 4 + 1
⇒ 1 = 9 − 2 · 4 = 9 − 2 · (20 − 2 · 9) = 9 · 9 − 4 · 20.
Taking this last equation modulo 20, we see that 92 ≡ 1 mod 20, so 9−1 ≡ 9 mod 20. The same equation also
tells us that 20−1 ≡ 4 mod 9. One clearly has
x ≡ a1 mod m1 ,
x ≡ a2 mod m2 ,
..
.
x ≡ ar mod mr ,
and moreover the set of all solutions is exactly the residue class of x modulo M = m1 m2 · · · mr .
Proof : For j = 1, 2, . . . , r, let Nj = m1 mm2j···mr , and note that (mj , Nj ) = 1. Therefore we may define bj to be
the inverse of Nj modulo mj , so Nj bj ≡ 1 mod mj . Set
r
X
x0 = Nj bj aj ;
j=1
we claim that x0 solves our system. Indeed, modulo mj , each Ni with i 6= j is congruent to 0 modulo mj , and
so x0 ≡ (Nj bj )aj mod mj ≡ aj mod mj , as claimed. Now, if x ≡ x0 mod M , then in particular for each j we
have
x ≡ x0 mod mj ≡ aj mod mj ,
so x is also a solution. Finally, if y is any solution to our system, then y ≡ aj mod mj ≡ x0 mod mj for every j,
so mj |(y − x0 ). Since the mi are pairwise coprime, we have m1 m2 |(y − x0 ), m1 m2 m3 |(y − x0 ), and so on, until
we obtain M |(y − x0 ), and we are done.
Remark: If m1 , m2 , . . . , mr are not pairwise coprime, then there may be no solution, or there may be one
residue class of solutions modulo [m1 , m2 , . . . , mr ]. For example, the system
x ≡ 0 mod 6,
x ≡ 1 mod 4,
10
has no solution, while
x ≡ 0 mod 6,
x ≡ 2 mod 4,
has as its solution the residue class of 6 modulo 12.
Example: Greg steals B boxes of 20 Timbits each. There are an equal number of each of the 9 flavours, and
one extra to fill the last box. In class, he divides the Timbits equally among the 19 students, with 4 leftover
for himself. What is the smallest possible value of B?
Solution: Let t be the total number of Timbits; we have
t ≡ 0 mod 20,
t ≡ 1 mod 9,
t ≡ 4 mod 19.
We need b1 ≡ N1−1 mod m1 ≡ (9 · 19)−1 mod 20 ≡ (9)−1 (19)−1 mod 20 ≡ 11 mod 20, from our previous work.
Similarly, b2 ≡ 5 mod 9, b3 ≡ −2 mod 19. Hence
Structural comments: Let Zm = Z/mZ be the set of residue classes modulo m. If d|m, then there is a
well-defined projection map πd : Zm → Zd given by
πd (a mod m) = a mod d.
Note that this map is not well-defined if d - m. Now, let m1 , m2 , . . . , mr be pairwise coprime. We have a
map
π : Zm1 m2 ···mr −→ Zm1 × Zm2 × · · · × Zmr ,
given in each component Zmi by πmi . The Chinese remainder theorem gives a map
such that π ◦ ρ = id. Since each set is finite, we know that π and ρ are bijections. One can check that:
1. π and ρ respect coprimality, and
2. π and ρ respect multiplication and addition.
Hence, π and ρ are ring isomorphisms. In particular, if Z×m is the set of reduced residue classes modulo m,
then
π : (Zm1 m2 ···mr )× −→ Z× × ×
m1 × Zm2 × · · · × Zmr
is an isomorphism of multiplicative groups. It follows from this, and the formula for the Euler φ-function,
that
φ(m1 m2 · · · mr ) = φ(m1 )φ(m2 ) · · · φ(mr ).
11
3 Week Three
π̃ : (Zm1 m2 ···mr )× −→ Z× × ×
m1 × Zm2 × · · · × Zmr ,
ρ̃ : Z× × × ×
m1 × Zm2 × · · · × Zmr −→ (Zm1 m2 ···mr ) .
Thus we are led to compute φ(pα ) for prime p; but since the only 1 ≤ k ≤ pα with (pα , k) > 1 must have
(pα, k) =
p, we deduce that exactly the multiples of p are not relatively prime to pα , hence φ(pα ) = pα − pα−1 =
pα 1 − p1 . It follows that
Y 1
φ(n) = n 1− ,
p
p|n
12
Proof : The cases p = 2, p = 3 are clear by computation. For p > 3, we pair off the numbers {2, 3, . . . , p − 2}
as {a1 , b1 , a2 , b2 , . . . , ak , bk }, where k = p−3
2 and ai bi ≡ 1 mod p. We know that this is well-defined by lemma
3.1.1, and the fact that inverses modulo p are unique. One then has
(p − 1)! = 1 · 2 · · · (p − 1) = 1 · (p − 1) · a1 b1 · · · ak bk
≡ 1 · (p − 1) · 1 · 1 · · · 1 mod p ≡ −1 mod p,
as claimed.
§2.2 – Solutions of congruences
How many solutions has
X 4 + 2X 3 + X + 1 ≡ 0 mod 5?
As integers, we have solutions
x ∈ {· · · , −14, −13, −9, −8, −4, −3, 1, 2, 6, 7, 11, 12, · · · }.
As residue classes modulo 5, we have only
x ≡ 1 mod 5 and x ≡ 2 mod 5;
we say that our congruence has only 2 solutions modulo 5.
Definition: Given a polynomial f (X) ∈ Z[X], the number of solutions of f (X) ≡ 0 mod m, denoted σf (m),
is the number of residue classes modulo m which satisfy the congruence; equivalently,
σf (m) = #{1 ≤ x ≤ m : f (x) ≡ 0 mod m}.
Example: Let f (X) = X 2 − 1. We saw that σf (20) ≥ 4, while by lemma 3.1.1 we know that if p is an odd
prime then σf (p) = 2, while σf (2) = 1.
We begin our investigation by studying linear congruences of the form ax ≡ b mod m.
Theorem 3.1.3 (Theorem 2.17, Niven) Let m ∈ N and set f (X) = aX − b, a, b ∈ Z. Set g = (a, m). Then
σf (m) = 0 unless g|b, in which case σf (m) = g.
Proof : If ax ≡ b mod m, then ax ≡ b mod g, i.e. 0x ≡ b mod g, since g|a, and hence we must have g|b. Now,
suppose g|b and write a = αg, b = βg, m = µg. Then
ax ≡ b mod m ⇔ αx ≡ β mod µ,
by theorem 2.1.5. But (α, µ) = 1 by construction, so α−1 modulo µ exists, and we have the unique solution
given by x ≡ α−1 β mod µ. This yields g = m
µ solutions modulo m, as claimed.
Example: Let m = 100 and g = 5, so that µ = 20. Then x ≡ 14 mod 20 if and only if x ≡ 14, 34, 54, 74, or 94
modulo 100.
Let m have prime factorization m = pe11 pe22 · · · perr . By the Chinese remainder theorem, the congruence f (x) ≡
0 mod m is equivalent to the system of congruences
f (x) ≡ 0 mod pe11 ,
f (x) ≡ 0 mod pe22 ,
..
.
f (x) ≡ 0 mod perr .
13
In particular, this implies that
r
Y
σf (m) = σf (pei i ),
i=1
and thus it suffices to study polynomial congruences modulo prime powers; this will be the focus of our next
lecture.
14
3.2 Lecture Seven
Exercise: Prove that the product of any k consecutive integers is a multiple of k!.
Solution: The pigeonhole principle implies that among any k consecutive integers must be a multiple of 1, of
2, and so on up to k, but this is not quite enough, since these numbers need not be pairwise coprime.
Instead, we may prove it one prime at a time, from which the general case follows. On the other hand, we may
simply use the identity
j(j − 1) · · · (j − k + 1) j! j
= = ∈ Z,
k! k!(j − k)! k
from which the fact is apparent; granted, the last method is a Deus ex machina.
§2.6 – Prime power moduli
Lemma 3.2.1 Let f (X) ∈ C[X] have degree d. Then for any a ∈ C, we have
Proof : Fix a; both expressions above are polynomials in h of degree d, and their zeroth derivatives agree at
h = 0, as do their first derivatives, second, and so on up to the dth derivatives. Thus their derivative, which is a
polynomial in h of degree at most d, is divisible by hd+1 , which implies that they must, in fact, be equal.
nb. With the notion of a derivative not defined here, we instead will use the formal derivative of a polynomial
or power series, i.e.
m
X m
X
n 0
if f (X) = an X , then f (X) = nan X n−1 , m ∈ N0 ∪ {∞}.
n=0 n=0
f (k) (a)
Lemma 3.2.2 If f (X) ∈ Z[X], then for any a ∈ Z, k ∈ N, we have that k! is an integer.
d
X
Proof : Write f (X) = an X n , an ∈ Z. Then
n=0
d
f (k) (a) X n(n − 1) · · · (n − k + 1) n−k
= a ,
k! k!
n=0
n(n−1)···(n−k+1)
and by the exercise we know that k! ∈ Z.
Theorem 3.2.3 (Hensel’s lemma) Let f (X) ∈ Z[X] and let pj be a prime power. Suppose there exists a ∈ Z
so that
f (a) ≡ 0 mod pj and f 0 (a) 6≡ 0 mod p.
Then there exists a unique integer t, 0 ≤ t < p such that f (a + tpj ) ≡ 0 mod pj+1 .
Example: Take f (X) = X 2 − 2, a = 4, pj = 71 . Then
It follows that exactly one element of {4, 11, 18, 25, 32, 39, 46} is a root of f (X) modulo 72 ; it turns out to be
39.
15
Note that the residue class a modulo pj is the union of the p residue classes a + tpj , 0 ≤ t < p. The one which
is a root modulo pj+1 is called a lift of a.
Proof of Hensel’s lemma: By lemma 3.2.1, we may write
Since f (a) ≡ 0 mod pj , we have that this is the case if and only if
f (a)
≡ −tf 0 (a) mod p.
pj
Since f 0 (a) 6≡ 0 mod p, we have that f 0 (a) is a unit modulo pj+1 , and so we find the unique class t to be given
by
−(f 0 (a))−1 f (a)
t≡ mod p,
pj
as can be easily verified.
f (a)
Example: Using the same example from before, we calculate pj
= 14
7 = 2, f 0 (a) = 8 ≡ 1 mod 7, so we ought
to take t = −(1)−1 (2) ≡ 5 mod 7, and indeed
Corollary 1: Given f (X) ∈ Z[X], a prime p, and a ∈ Z with f (a) ≡ 0 mod p and f 0 (a) 6≡ 0 mod p, then for
every j ≥ 2 there exists a unique lift of a to a root of f modulo pj ; that is, a unique residue class aj mod pj
such that
f (aj ) ≡ 0 mod pj and aj ≡ a mod p.
nb. The condition f 0 (a) 6≡ 0 mod p is the condition that a is a nonsingular root of f (X) modulo p. As
written, this formula fails for singular roots: consider f (X) = X 2 . Then a = 0 is a root modulo p, and every lift
of a is a root of f modulo p2 . Similarly, for g(X) = X 2 − p, a = 0 is a root modulo p, but no lifts of a are roots
modulo p2 . There is a more general version of Hensel’s lemma (theorem 2.24 of Niven) which accommodates
such roots.
Fact: There exist polynomials, such as
which have roots modulo m for every m ∈ N, but have no roots over the rationals.
16
3.3 Lecture Eight
where f (a) = 0 and deg g = d − 1, as guaranteed by lemma 3.3.1. Since p is prime, any root of f (X) modulo p
is a root of X − a or g(X). By the inductive hypothesis, g has at most d − 1 roots modulo p, and X − a has a
single root modulo p, from which we deduce the result.
Example: Consider f (X) = X p − X with p prime. By Fermat’s little theorem, every residue class modulo p
is a root of f , and by lemma 3.3.1 it follows that
Comparing coefficients yields some interesting congruences, among which we have in the coefficient of X p−1
0 + 1 + 2 + · · · + (p − 1) ≡ 0 mod p, p > 2,
17
and in the coefficient of X p−2 X
jk ≡ 0 mod p, p > 3.
0≤j<k≤p−1
(p − 1)! ≡ −1 mod p.
Remark: This example implies that if f (X), g(X) ∈ Z[X] are such that f (a) ≡ g(a) mod p for every a ∈ Z,
then
f (X) − g(X) ≡ h(X)(X p − X) mod p
for some h(X) ∈ Z[X]. In fact, this condition is also sufficient.
Proposition 3.3.3 Let F (X) be any function (i.e. set map) from Zp to Zp . Then there exists a unique
polynomial g(X) modulo p of degree at most p − 1 such that
Proof : We show uniqueness first. If g(X), h(X) both satisfy the condition, then from our remark above we
have that
g(X) − h(X) = q(X)(X p − X), some q(X) ∈ Z[X].
Comparing degrees, we see that we must have g = h. For existence, we give two proofs. First of all, if we
set
p−1
X
g(X) = (1 − (X − a)p−1 )F (a),
a=0
then by Fermat’s little theorem we see that g(a0 ) ≡ (1 − 0)F (a0 ) mod p ≡ F (a0 ) mod p.
Alternatively, we observe that there are exactly pp functions Zp → Zp , and there are exactly pp polynomials
over Zp of degree at most p − 1. No two of these polynomials give the same function, and it follows that the
two sets must coincide.
Corollary 1: (Corollary 2.30, Niven) Let p be prime and suppose that d|(p − 1). Then X d − 1 has exactly d
roots modulo p.
Proof : By theorem 3.3.2 there are most d roots, so we need only show there are at least d roots. Note
that
X p−1 − 1 ≡ (X − 1)(X − 2) · · · (X − p + 1) mod p
has exactly p − 1 roots modulo p. Since d|(p − 1), we have
The second factor has at most p − 1 − d roots modulo p, and so by the pigeonhole principle X d − 1 must have
at least d roots modulo p, as claimed.
§2.8 – Primitive roots and power residues
Consider the congruence X n ≡ 1 mod m; note that any solution a must satisfy (a, n) = 1.
Definition: Given a with (a, m) = 1, the multiplicative order of a modulo m (often called simply the
order of a) is the least positive integer k such that ak ≡ 1 mod m. One sometimes says that a belongs to the
exponent k modulo m.
18
Example: Let m = 11, a = 3. We have
31 ≡ 3 mod 11, 32 ≡ 2 mod 11, 33 ≡ 5 mod 11, 34 ≡ 4 mod 11, 35 ≡ 1 mod 11,
19
4 Week Four
Lemma 4.1.1 (Lemma 2.31, Niven) ak ≡ 1 mod m if and only if the order of a modulo m divides k.
Proof : Let h be the order of a modulo m. If h|k, we have k = hq for some q, hence
Conversely, if ak ≡ 1 mod m, we may use the division algorithm to write k = hq + r, 0 ≤ r < h. One then
has
1 ≡ ak mod m ≡ (ah )q ar mod m ≡ ar mod m.
Since h is the minimal positive integer such that ah ≡ 1 mod m, it follows that r = 0, and we are done.
If (a, m) = 1, then the order of a modulo m divides φ(m).
h
Lemma 4.1.2 (Lemma 2.33, Niven) If a has order h modulo m, then ak has order (h,k) modulo m.
h
For example, the order of a2 modulo m is 2 if h is even, and h if h is odd.
Proof : The following statements about positive integers j are equivalent:
1. (ak )j ≡ 1 mod m
2. h|(kj)
h k
3. (h,k) | (h,k) j
h
4. (h,k) |j
h
It follows that the least positive j satisfying (4), and hence (1), is exactly j = (h,k) .
Remark: The subgroup of Z× m generated by a is a cyclic group of order h. The same proof shows that the
h
smallest positive integer y such that ky ≡ 0 mod h is y = (h,k) .
Lemma 4.1.3 Let a have order r modulo m, and let b have order s modulo m. Then the order of ab modulo
rs rs [r,s]
m divides (r,s) = [r, s], and moreover is a multiple of (r,s)2 = (r,s) .
In particular (Lemma 2.34, Niven), if (r, s) = 1, then the order of ab modulo m is exactly rs.
Proof : Let t be the order of ab modulo m. Then
20
Proposition 4.1.4 If m has a primitive root, then it has exactly φ(φ(m)) primitive roots.
Proof : Let g be a primitive root modulo m. Then we have a reduced residue system modulo m given by
φ(m)
{g, g 2 , . . . , g φ(m) }. By lemma 4.1.2, the order of g j modulo m is exactly (j,φ(m)) , which equals φ(m) exactly
when (j, φ(m)) = 1. There are exactly φ(φ(m)) such residue classes, and we are done.
Lemma 4.1.5 (Lemma 2.35, Niven) Let p, q be primes and let r ∈ N be such that q r |(p − 1). Then there are
q r − q r−1 residue classes of order q r modulo p.
r
Proof : The order of a modulo p divides q r if and only if aq ≡ 1 mod p. This congruence has exactly q r solutions
r−1
by corollary 1 of proposition 3.3.3. The order of a modulo p divides q r−1 if and only if aq ≡ 1 mod p, which
has exactly q r−1 solutions. The result is now immediate.
Theorem 4.1.6 (Theorem 2.36, Niven) Every prime p has a primitive root.
Proof : If p = 2 the result is immediate, so assume p is odd and write p − 1 in its prime factorization
21
4.2 Lecture Ten
Example: Modulo 5, the reduced residue classes are 1, 2, 3, and 4, with respective orders 1, 4, 4, and 2; we see
that 2 and 3 are the φ(φ(5)) primitive roots modulo 5. What are the primitive roots modulo 25? Exactly
Note that there are 8 = φ(φ(25)) of them, and that all are also primitive roots modulo 5. In fact, we may lift
any primitive root modulo p to p − 1 primitive roots modulo p2 , and for j ≥ 2, any primitive root modulo pj
lifts to exactly p primitive roots modulo pj+1 .
Proposition 4.2.1 For n ≥ 1, we have X
φ(d) = n.
d|n
Proof : The fractions { n1 , n2 , . . . , nn } are not all in lowest terms; when we do so, we may consider their denomi-
nators. For every divisor d of n, exactly φ(d) of these fractions have denominator d; indeed, these fractions are
exactly
k(n/d)
: 1 ≤ k ≤ d, (k, d) = 1 .
n
Since there are exactly n fractions in our original set, the result follows.
Alternative proof of the existence of primitive roots modulo p: We use strong induction to find the
number of elements of order k modulo p, namely φ(k) if k | (p − 1), and 0 if k - (p − 1). The case k = 1 is
trivial. For k > 1, k | (p − 1), we first note that
X X
φ(k) + φ(d) = φ(d) = k.
d|k, d|k
d<k
Since p is prime, there are exactly k solutions to the congruence xk ≡ 1 mod p, which are exactly those x
modulo p with order dividing k. This, again, is exactly the sum
X
#{x : ordp (x) = k} + #{x : ordp (x) = d},
d|k,
d<k
where ordp (x) denotes the order of x modulo p; the result is now immediate.
Lemma 4.2.2 If d|n, then for any a with (a, n) = 1, the order of a modulo d divides the order of a modulo n.
Proof : If ordn (a) = h, then ah ≡ 1 mod n, so ah ≡ 1 mod d.
Proposition 4.2.3 If g is a primitive root modulo pr with r ≥ 2, then
r−2 (p−1)
gp 6≡ 1 mod pr .
22
from which it follows that
r−2 (p−1)
gp 6≡ 1 mod pr .
Now, suppose that g is a primitive root modulo pr−1 and that
r−2 (p−1)
gp 6≡ 1 mod pr .
The order of g modulo pr divides φ(pr ) = pr−1 (p − 1), and by lemma 4.2.2 must be a multiple of pr−2 (p − 1).
Since ordpr (g) 6= pr−2 (p − 1) by assumption, we deduce the result.
Theorem 4.2.4 Primitive roots exist modulo p2 for any prime p.
Proof : Let g be a primitve root modulo p and consider the lifts g + tp modulo p2 , 0 ≤ t ≤ p − 1. We claim
that all but one of these lifts are primitive roots modulo p2 .
Indeed, by proposition 4.2.3 it suffices to show that exactly one lift satifsies
(g + tp)p−1 ≡ 1 mod p2 .
Thus g is a nonsingular root of f modulo p, and so by Hensel’s lemma exactly one lift of g is a root of f modulo
p2 ; every other such lift must then yield a primitive root.
Lemma 4.2.5 If g is a primitive root modulo p2 , then it is also a primitive root modulo p.
Proof : If ak ≡ 1 mod p, then
Both factors are multiples of p, so it follows that apk ≡ 1 mod p2 . In particular, if g is a primitive root modulo
p2 , then g pk 6≡ 1 mod p2 for k = 1, 2, . . . , p − 2. Hence g k 6≡ 1 mod p for 1 ≤ k ≤ p − 2, and it follows that the
order of g modulo p is p − 1.
Next, we will consider primitive roots modulo pr for r ≥ 3. No more degenerate cases arise here, except when
p = 2. In this case, there are no primitive roots modulo 2r for any r ≥ 3.
23
4.3 Lecture Eleven
Theorem 4.3.1 Let p be an odd prime and let r ≥ 2. Then any primitve root modulo p2 is a primitive root
modulo pr .
Proof : We induct on r. The case r = 2 is trivial, so for r > 2 assume g is a primitive root modulo pr ; we will
show that g is a primitive root modulo pr+1 .
Indeed, by proposition 4.2.3 we have that
r−2 (p−1)
gp 6≡ 1 mod pr ,
r−1
and so by the same proposition it suffices to show that g p (p−1) 6≡ 1 mod pr+1 . By Euler’s theorem we have
that
r−2
g p (p−1) ≡ 1 mod pr−1 ,
r−2 (p−1)
so we can write g p = 1 + npr−1 for some n 6≡ 0 mod p. By the binomial theorem we have that
p
pr−1 (p−1) r−1 p
X p
g = (1 + np ) = (npr−1 )k ,
k
n=0
p p
for 2 ≤ k ≤ p − 1, we see that pr+1 | (npr−1 )k . In fact we also have this divisibilty when k = p,
and since p| k k
and so
r−1 (p−1)
gp ≡ 1 + npr mod pr+1 6≡ 1 mod pr+1 ,
and we are done.
p
n2 p2r−2 .
nb. We only use the fact that p is odd in the cancellation of 2
Lemma 4.3.2 If r ≥ 3, then the order of every odd integer modulo 2r divides 2r−2 = 21 φ(2r ). In particular,
there are no primitive roots modulo 2r .
Proof : Again we induct on r. We did the case r = 3 in the last lecture, and so assuming the claim is true for
some r with r ≥ 3, then
r−2
a2 ≡ 1 mod 2r
r−2 r−2
for every odd a. Then 2r |(a2 − 1) and 2|(a2 + 1) by parity, hence
r−2 r−2 r−1
2r+1 |(a2 − 1)(a2 + 1) = a2 − 1,
r−1
whence a2 ≡ 1 mod 2r+1 , as claimed.
α
nb. The same proof shows that if a ≡ 5 mod 8, then 2α+2 ||(a2 − 1), where pk ||n if and only if pk | n and
pk+1 - n.
r−2
Theorem 4.3.3 (Theorem 2.43, Niven) Let r ≥ 3; then the set {±5, ±52 , . . . , ±52 } is a reduced residue
system modulo 2r . In particular, 5 has order 2r−2 modulo 2r , and the abelian group homomorphism
f : Z2r−2 × Z2 −→ Z×
2r
24
By way of comparison, note that if p is odd, the map is an isomorphism
f : Zpr−1 (p−1) −→ Z×
pr
Finally, 5k ≡ 1 mod 4, while −5k ≡ 3 mod 4, so the two sets above are disjoint, and we are done.
e1 e2
We now know the group structure of Z× er
n for every n. If n has prime factorization n = p1 p2 · · · pr , then by the
Chinese remainder theorem
Z× ∼ × × ×
n = Zpe1 × Zpe2 × · · · × Zper . r
1 2
If p is odd, then
Z× ∼
e = Z ei −1 ,
p i
i
p i (p −1)
i
and similarly
aφ(n)/2 = (aφ(d) )φ(c)/2 ≡ 1φ(c)/2 mod d ≡ 1 mod d,
since by our assumption 2|φ(c), 2|φ(d). Our claim then follows by the Chinese remainder theorem.
The only integers a which do not have such a factorization are powers of 2, or are of the form a = pr or a = 2pr ,
where p is an odd prime and r ≥ 1. Numbers of this form are the only ones which could possibly have primitive
roots.
Theorem 4.3.4 (Theorem 2.41, Niven) The moduli that have primitive roots are exactly 1, 2, 4, pr , and 2pr ,
where p is an odd prime and r ≥ 1.
Proof : Next lecture.
25
5 Week Five
Fun fact! If S(x) denotes the set of squarefree numbers s with s ≤ x, then one has
#S(x) 6
lim = 2.
n→∞ x π
Recall theorem 4.3.4 from last lecture, and let P R denote the set of moduli which have primitive roots. For
example, modulo 18, we have φ(18) = 6, and indeed a reduced residue system is given by {1, 5, 7, 11, 13, 17},
which have respective order 1, 6, 3, 6, 3, and 2. Thus 5 and 11 are primitive roots modulo 18, and as expected
we find there are 2 = φ(φ(18)) of them.
Similarly, modulo 9 a reduced residue system is given by {1, 2, 4, 5, 7, 8} with respective orders 1, 6, 3, 6, 3, and
2 (note the similarity with Z×
18 ), and we have the same result with the primitive roots 2 and 5.
Proof : (of theorem 4.3.4) We need only check that m = 2pr has primitive roots, the other claims having
already been proven. If {a1 , a2 , . . . , aφ(pr ) } is a reduced residue system modulo pr , then we claim that
{aj : 2 - aj } ∪ {aj + pr : 2 | aj }
is a reduced residue system modulo 2pr . Indeed, we see that we have exactly φ(2pr ) = φ(2)φ(pr ) = φ(pr )
residue classes, that all are distinct, and since (aj , p) = 1 we have u, v so that aj u + pv = 1; thus writing x = u
and y = v − pr−1 u, we have
and hence (since p is assumed odd) aj + pr is indeed a unit modulo 2pr , by the Chinese remainder theorem.
Furthermore, the order of the elements of the latter set (the lifts of the even aj ) do not change, as for 0 < k <
ordpr (aj ) we have
k
r k
X k n r(k−n)
(aj + p ) = a p ≡ akj mod pr ,
n j
n=0
which is nonzero by assumption, thus akj 6≡ 0 mod 2pr . The same argument holds for the odd aj , and we see
that one of the elements in our reduced residue system must have order φ(pr ) = φ(2pr ), which completes the
proof.
× ∼
Remark: When m is odd, we have an isomorphism of groups π : Z×
m −→ Z2m .
Corollary 1: (Corollary 2.42, Niven) Let m ∈ P R and let (a, m) = 1. The congruence xn ≡ a mod m has d
solutions if aφ(m)/d ≡ 1 mod m where d = (n, φ(m)), and zero solutions otherwise.
Remark: The analogue for m = 2r , r ≥ 3, is corollary 2.44 in Niven.
Proof : Let g be a primitive root modulo m. Choose j, 1 ≤ j ≤ φ(m) so that g j ≡ a mod m, and note that if
xn ≡ a mod m then one must have (x, n) = 1. For every such x, there exists k so that g k ≡ x mod m, and thus
it suffices to solve the congruence
(g k )n ≡ g j mod m
for k. Since the order of g is φ(m), this congruence has a solution if and only if kn ≡ j mod φ(m). For fixed j,
theorem 3.1.3 tells us that there are d = (n, φ(m)) solutions if d|j, and none otherwise. But d|j if and only if
j = dl for some 1 ≤ l ≤ m, if and only if a ≡ g dl mod m.
26
Finally, this is equivalent to the statement that aφ(m)/d ≡ g φ(m)l mod m (it is a sufficient condition because
g di 6≡ 1 mod m for 1 ≤ i ≤ l − 1); but g φ(m)l ≡ 1 mod m, and we are done.
Corollary 2: (Corollary 2.38, Niven; Euler’s criterion): Let p be an odd prime. The congruence X 2 ≡ a mod p
p−1
has two solutions if a 2 ≡ 1 mod p, and no solutions otherwise. There is one solution if p|a.
Definition: The Carmichael lambda function, denoted λ(m), is the smallest exponent e ∈ N such that
ae ≡ 1 mod m for every (a, m) = 1.
Remark: We know λ(m)|φ(m), and λ(m) = φ(m) if and only if m ∈ P R. Moreover, as seen last week, if
m ∈ P R then λ(m) ≤ φ(m)
2 . By the Chinese remainder theorem,
For odd primes, we have λ(pr ) = pr−1 (p − 1), which also holds for p = 2 and r ≤ 2. For r ≥ 3, one has instead
λ(2r )/2r−2 . Group theoretically, λ(m) is the exponent of the group Z× m.
and so 2341−1 = (210 )34 ≡ 134 mod 341 ≡ 1 mod 341. Thus 341 is a base-2 pseudoprime. This notion gives rise
to the Fermat test for primality: if bm−1 6≡ 1 mod m, then m is composite. For example, with m = 341, b = 3,
we have
3341−1 ≡ 56 mod 341 6≡ 1 mod 341,
and it follows that 341 is not prime.
27
5.2 Lecture Thirteen
p−1
Example: We investigate such congruences modulo 7, when 2 = 3.
a ord7 (a) a3 mod 7 Solutions of x2 ≡ a mod 7
0 – 0 x ≡ 0 mod 7
1 1 1 x ≡ 1, 6 mod 7
2 3 1 x ≡ 3, 4 mod 7
3 6 −1 none
4 3 1 x ≡ 2, 5 mod 7
5 6 −1 none
6 2 −1 none
Definition: If (a, m) = 1, then a is called a quadratic residue modulo m if X 2 ≡ a mod m has a solution,
and a quadratic nonresidue otherwise.
Definition: If p is an odd prime, define the Legendre symbol ap via
a 1 if a is a quadratic residue modulo p,
= −1 if a is a quadratic nonresidue modulo p,
p
0 if p|a.
28
a b
. Moreover, the number of solutions of X 2 ≡ a mod p is exactly
Remark: If a ≡ b mod p, then p = p
a
p + 1.
p−1
a
Theorem 5.2.1 (Theorem 3.1, Niven) If p is an odd prime and (a, p) = 1, then p =a 2 .
Proof : We give two proofs. In the first, we simply use Euler’s criterion (this is left as an exercise).
For the second, we observe that if a is a quadratic residue modulo p, then we can choose some z such that
z 2 ≡ (−z)2 mod p ≡ a mod p. We then pair the reduced residue classes modulo p apart from ±z as (xi , yi ),
with xi yi ≡ a mod p. There are p−3
2 such pairs, and by Wilson’s theorem
p−3
2
Y
−1 ≡ (p − 1)! mod p ≡ z(−z) xi yi mod p
i=1
p−3 p−1
≡ −a · a 2 mod p ≡ −a 2 mod p,
and the result follows. If a is a nonresidue, we repeat the above construction, this time pairing all residue
classes xi y1 ≡ a mod p, i = 1, 2, . . . , p−1
2 , and we are done.
a2
Corollary 1: For any integers a, b, we have ab a b
p = p p ; in particular, if (a, p) = 1 we have p = 1.
In other words, the product of two quadratic residues is a quadratic residue, as is the product of two quadratic
nonresidues. The product of a residue and a nonresidue is a nonresidue – compare this behaviour with that of
the positive and negative integers.
29
5.3 Lecture Fourteen
p−1
and hence x = 2 ! solves x2 ≡ −1 mod p.
Theorem 5.3.1 (The Law of Quadratic Reciprocity) Let p 6= q be odd primes; then
p q p−1 q−1
= (−1) 2 · 2 .
q p
X 2 ≡ p mod q has solutions is the same as knowing whether or not X 2 ≡ q mod p has solutions.
Proof : (due to Rousseau, 1991) First, some background. Let α = p−12 ,β =
q−1
2 . Let
n pq o
F = 1≤k< : (k, pq) = 1
2
be the “first half” of Z×
pq and let
n qo
L = (i, j) ∈ Z×
p × Z×
q : 1 ≤ i ≤ p − 1, 1 ≤ j <
2
be the “left half” of Z× ×
p × Zq , and let π : Zpq → Zp × Zq be the map given by the Chinese remainder theorem.
One can see that for every k ∈ Z× pq , one has π(k) ∈ L or −π(k) ∈ L (we will write k ∈ −L). For each such k,
choose k ∈ {±1}, ik ∈ {1, 2, . . . , p − 1}, jk ∈ {1, 2, . . . , β} such that
π(k) = (ik , jk ).
30
In particular, if k 6= k 0 ∈ F , then π(k) 6= π(k 0 ) and π(k) 6= −π(k 0 ). Thus each ordered pair (ik , jk ) is distinct,
and we obtain !
Y Y Y Y Y
(k, k) ≡ π(k) ≡ k (ik , jk ) ≡ k (i, j) , (2)
k∈F k∈F k∈F k∈F (i,j)∈L
Y p−1
YY β
(i, j) ≡ (i, j) ≡ (((p − 1)!)β , (β!)p−1 ).
k∈F i=1 j=1
31
with the last congruence following by Euler’s criterion. Thus (3) becomes
−1
Y
β q
k ≡ ((p − 1)!) α! α! mod p,
p
k∈F
q
which by Wilson’s theorem is congruent modulo p to (−1)β p . The same proof shows
Y p
k ≡ (−1)α mod q,
q
k∈F
The first co-ordinate tells us that pq ≡ mod p, and the second that pq = (−1)αβ = (−1)αβ pq (where we
p q
= (−1)αβ ,
q p
as claimed.
32
6 Week Six
33
The proof is not given here.
§3.3 – The Jacobi symbol
Let p1 , p2 , . . . , pk be odd primes (not necessarily distinct), and let Q be their product. The Jacobi symbol
a
Q is defined
Y k
a a
= ,
Q pj
j=1
a 2
a a a a a
= 0
= 0
√ = .
Q Q S Q S Q
Proof : If k = 2, then
b1 b2 − 1 b1 − 1 b2 − 1 (b1 − 1)(b2 − 1)
− + = ≡ 0 mod 2,
2 2 2 2
and the general case follows by induction (exercise).
34
−1
Theorem 6.1.3 (Theorem 3.7, Niven) If Q > 0 is odd, then the Jacobi symbol Q equals
(
Q−1 1 if Q ≡ 1 mod 4,
(−1) 2 =
−1 if Q ≡ 3 mod 4.
Proof : Since square factors of Q do not affect the Jacobi symbol (as illustrated above), we may assume without
loss of generality that Q = p1 p2 · · · pk is squarefree. Then by lemma 6.1.2 we have that
Q−1 p1 − 1 p2 − 1 pk − 1
≡ · ··· mod 2,
2 2 2 2
hence
−1 −1 −1 −1
p1 −1 p2 −1 pk −1 Q−1
= ··· = (−1) 2
(−1) 2
· · · (−1) 2
= (−1) 2 ,
Q p1 p2 pk
as claimed.
35
6.2 Lecture Sixteen
Theorem 6.2.1 (Theorem 3.8, Niven; the law of Quadratic reciprocity for Jacobi symbols) Let P, Q ∈ N be
odd with (P, Q) = 1. Then
(
P Q P −1 Q−1
· −1 if P ≡ Q ≡ 3 mod 4,
= (−1) 2 2 =
Q P 1 otherwise.
P
Note that if (P, Q) > 1, we must have Q = 0.
Proof : Write P = p1 p2 · · · pk , Q = q1 q2 · · · ql , where the pi and qj are odd (not necessarily distinct) primes. By
multiplicativity, we have
Y k k Yl
P pi Y pi
= = ,
Q Q qj
i=1 i=1 j=1
where the factors in the last product are Legendre symbols. The law of quadratic reciprocity (for Legendre
symbols) then implies that
Yk Y
l
P qj pi −1 qj −1 Q Pk Pl pi −1 qj −1
= (−1) 2 · 2 = (−1) i=1 j=1 2 · 2 .
Q pi P
i=1 j=1
hence
P P −1 Q−1
= (−1) 2 · 2 ,
Q
as claimed.
2
Application: We calculate the Legendre symbol p , where p is an odd prime; rather, we will show that the
Jacobi symbol Q2 obeys the formula from last lecture, namely
(
2 Q2 −1 1 if Q ≡ ±1 mod 8,
= (−1) 8 =
Q −1 if Q ≡ ±3 mod 8,
from which the special case of the Legendre symbol follows. By periodicity in the top argument, we have
that
2 2−Q −1 Q − 2 Q−1 Q−2
= = = (−1) 2 .
Q Q Q Q Q
Since Q is odd and positive, we must have that (Q, Q−2) = 1, and so by quadratic reciprocity we see that
2 Q−1 Q Q−1 Q−3
= (−1) 2 (−1) 2 · 2 ;
Q Q−2
again, since one of Q − 1 and Q − 3 must be divisible by 4, we cancel the last factor and obtain
2 Q−1 Q Q−1 2
= (−1) 2 = (−1) 2 .
Q Q−2 Q−2
36
By descent, we obtain
2 Q−1 Q−3
3 2 2
= (−1) 2 (−1) 2 · · · (−1) (−1) ,
Q 3
and finally since 2 is a quadratic nonresidue modulo 3 we have
2 Q−1 1 Q−1 Q+1 Q2 −1
= (−1)1+2+···+ 2 = (−1) 2 · 2 · 2 = (−1) 8 ,
Q
and we are done.
a
We can turn this into a general algorithm for computing the Jacobi symbol. Indeed, to compute Q , we may
apply the following steps:
P
1. Factor −1 and any powers of 2 from a, leaving Q with P an odd positive number.
2. Use quadratic reciprocity and periodicity.
3. If not finished, return to 1.
Note, in particular, that this algorithm doesn’t require us to factor any integers.
Example: 53681 is prime and congruent to 1 modulo 4. Is 1311 a quadratic residue modulo 53681?
It suffices to compute the Jacobi symbol, which in the case that Q is an odd prime is exactly the Legendre
symbol. Using the algorithm outlined above, we find
1311 53681 −70 −1 2 35
= = =
53681 1311 1311 1311 1311 1311
2
35 1311 16 4
= (−1)(1) =− (−1) = = = 1.
1311 35 35 35
So 1311 is indeed a square modulo 53681.
Here we will give an outline of a more “traditional” proof of the law of quadratic reciprocity, nearer to the proof
given in Niven. We start with a preliminary result.
Lemma 6.2.2 (Gauss’s lemma) Let p be an odd prime and let
p−1 p+1 p+3
F = 1, 2, . . . , , −F = , ,...,p − 1 .
2 2 2
Note that from this we can immediately compute p2 , since in this case n = #{ p4 < k < p2 }. Next, we show
that
p−1
2
X aj
n≡ mod 2,
p
j=1
One proof of this fact counts lattice points in the rectangle R in the first quadrant, whose vertices are at
(0, 0), (0, q), (p, 0) and (p, q); specifically, those lying above and below the line segment joining the origin to
(p, q) — but this is all the detail we give here.
37
With this machinery, we can show that there are infinitely many primes congruent to 1 modulo 4. Indeed, if
p1 , p2 , . . . , pk is any finite list of such primes, let
N = (2p1 p2 · · · pk )2 + 1.
Then pi - N for i = 1, 2, . . . , k. But since N is one more than a square and odd, we know that all of its
prime factors must be congruent to 1 modulo 4; in particular, there must be such a prime which is not on the
list.
38
6.3 Lecture Seventeen
where dxe denotes the ceiling function. Thus by the pigeonhole principle there must be two distinct elements
u + zv, u0 + zv 0 (i.e. with not both u = u0 and v = v 0 ) which are congruent modulo p. Define
x = u − u0 , y = v 0 − v.
Then since u − u0 ≡ z(v 0 − v) mod p, we see that x2 ≡ −y 2 mod p, and so p|(x2 + y 2 ). Moreover, we see
that
|x2 + y 2 | ≤ |x|2 + |y|2 < 2p,
and since we do not have x = y = 0 by our earlier remarks, it follows that x2 + y 2 = p. Furthermore, if
d = (x, y), then it follows that d2 |p and hence d = 1.
Theorem 6.3.3 (due to Fermat) An integer n is properly represented by X 2 + Y 2 if and only if 4 - n and no
prime p ≡ 3 mod 4 has p | n.
39
Proof : Suppose first that n = x2 + y 2 with (x, y) = 1, and let p ≡ 3 mod 4 be prime. If p|(x2 + y 2 ), then by
lemma 6.3.2 p|x and p|y, thus (x, y) > 1, a contradiction.
Conversely suppose that no prime factor p of n has p ≡ 3 mod 4. Since we know each prime factor is properly
represented, its suffices to prove that the product mn of any numbers m, n properly represented by X 2 + Y 2 ,
is itself properly represented.
Write m = w2 + z 2 and n = x2 + y 2 with (w, z) = (x, y) = 1. Then
where every pi has pi ≡ 1 mod 4 and every qj has qj ≡ 3 mod 4. Then n is represented by X 2 + Y 2 if and only
if every γj is even; in other words, if and only if we can write n = ab2 , where
40
7 Week Seven
41
implies that
m
(2am + bn)2 − dn2 = 0 ⇔ dn2 = (2am + bn)2 ⇔ d = (2a + b)2 ,
n
so d < 0 is the square of a rational number, which is a contradiction. A symmetric argument with the assumption
m 6= 0 completes the proof.
We might ask: when is f positive? negative?
Theorem 7.1.2 (Theorem 3.11, Niven) Let f be a binary quadratic form of discriminant d. If d > 0 then f
is indefinite, that is, f represents both positive and negative values. If d < 0 and a > 0, then f is positive
definite. If d < 0 and a < 0, then f is negative definite.
Proof : Suppose d > 0. Then if a 6= 0 we have that f (1, 0) = a and f (b, −2a) = −ad, and since d > 0 we
know that a and −ad have opposite signs, so f is indefinite. The same argument works if we assume c 6= 0,
using f (0, 1) = c, f (−2c, b) = −cd. Finally if a = c = 0 then f (1, 1) = b, f (−1, 1) = −b, and since f 6= 0 by
assumption this exhausts all cases.
Suppose now that d < 0 so that in particular d is not a perfect square. Then we know a 6= 0 and so by our
identity we have that
4af (x, y) = (2ax + by)2 + |d|y 2 ≥ 0,
from which it follows that a must have the same sign as f (x, y). The same equation shows that if f (x, y) = 0
then y = 0, thus x = 0, and we are done.
42
7.2 Lecture Nineteen
Theorem 7.2.1 (Theorem 3.12, Niven) Let d ∈ Z; then there exists a binary quadratic form of discriminant
d if and only if d ≡ 0 or 1 mod 4.
Proof : Suppose f (X, Y ) = aX 2 + bXY + cY 2 has discriminant d; then
d = b2 − 4ac ≡ b2 mod 4,
and since the squares modulo 4 are 0 and 1 the result is clear. Conversely, if d ≡ 0 mod 4 we may take
f (X, Y ) = X 2 − d4 Y 2 which has discriminant d, and if d ≡ 1 mod 4 we instead take f (X, Y ) = X 2 +XY − d−1
4 Y
2
f (X, Y ) = nX 2 + uXY + vY 2 ,
we see that the discriminant of f is u2 −4nv = d and that f (1, 0) = n. Conversely, suppose that as2 +bst+ct2 = n
with (s, t) = 1 and b2 − 4ac = d. Choose m1 , m2 ∈ Z such that (m1 , m2 ) = 1, m1 m2 = 4n, and also (m1 , t) =
(m2 , s) = 1. Note that we can always choose such m1 , m2 : for example,
Y 4n
m1 = pordp (4n) , m2 = .
m1
p|s
Recalling from last lecture the identity 4af (x, y) = (2ax + by)2 − dy 2 , hence
since (t, m1 ) = 1. A symmetric argument shows that d ≡ (2cts−1 + b)2 mod m2 , and since (m1 , m2 ) = 1 the
Chinese remainder theorem implies that we have a solution to the congruence x2 ≡ d mod m1 m2 ≡ d mod 4n,
and we are done.
Corollary 1: Let d ≡ 0 or 1 mod 4, and let p be an odd prime. There exists a binary quadratic form of
discriminant d representing p if and only if dp = 0 or 1.
Proof : By Theorem 7.2.2 it suffices to show that x2 ≡ d mod 4p has a solution if and only if dp = 0 or 1.
Conversely, if dp = 0 or 1, then we may write x2 ≡ d mod p, and since d is a square modulo 4 by assumption
we have y 2 ≡ d mod 4, and the Chinese remainder theorem completes the proof.
Thus we are led to investigate the set of all binary quadratic forms of a given discriminant.
43
Example: Determine all integers represented by f (X, Y ) = 53X 2 + 152XY + 109Y 2 .
If we set y = 2u − 7v, x = −3u + 10v, then a calculation shows that f (x, y) = u2 + v 2 , and thus if n is
represented by f , it is also represented by X 2 + Y 2 . Conversely if n is represented by this latter form, then
n = u2 +v 2 = f (−3u+10v, 2u−7v), and we see that both forms represent exactly the same set of integers.
We can
associate to any binary quadratic form f (X, Y ) = aX 2 + bXY + cY 2 the 2 × 2 symmetric matrix
b
a
F = b 2 , which has the property that
2 c
T x
~x F ~x = f (x, y), ~x = ,
y
53 76
where AT
denotes the matrix transpose. In our above example, F = is associated to f (X, Y ) =
76 109
2 2 1 0
53X + 152XY + 109Y , and G = is associated to g(X, Y ) = X 2 + Y 2 .
0 1
With this in mind, we write our change of variables from our example above as
x −3 10 u
~x = = =: M~u,
y 2 −7 v
hence
f (x, y) = ~xT F ~x = (M~u)T F (M~u) = ~uT (M T F M )~u,
and indeed, M T F M = G.
44
8 Week Eight
Since f (−u, −v) = f (u, v) for any binary quadratic form, the negative signs in this matrix are of no concern.
Thus we obtain F = (M −1 )T GM −1 , which combined with our previous relation G = M T F M implies that f
and g represent exactly the same integers.
Definition: The modular group Γ is the set of all 2 × 2 matrices over Z with determinant 1, with the group
operation being multiplication.
Also used to denote Γ are SL2 (Z) and SL(2, Z). Since Γ is a group we have that M ∈ Γ ⇔ M −1 ∈ Γ.
Definition: Two binary quadratic forms f and g are called equivalent, denoted f ∼ g, if there exists some
M ∈ Γ such that M T F M = G, where F and G are the associated matrices of f and g, respectively.
t a b
It is easy to see that if f ∼ g with M F M = G, M = , then f (ax + by, cx + dy) = g(x, y). In our
c d
previous example, we showed that 53X 2 + 152XY + 109Y 2 ∼ X 2 + Y 2 .
Remark: If M T F M = G, then (−M )T F (−M ) = G. Thus we may take M or −M as we see fit, or equivalently
choose a representative from P SL2 (Z) = Γ/{±I}.
Theorem 8.1.1 (Theorem 3.16, Niven) ∼ is an equivalence relation.
Proof : Reflexivity is clear, as F = I T F I, as is symmetry by our remarks above, so it suffices to prove
transitivity. Suppose f ∼ g, g ∼ h, and let M, N ∈ Γ be such that M T F M = G, N T GN = H. Then M N ∈ Γ
and (M N )T F (M N ) = H, so f ∼ h, and we are done.
2
Note that if f (X, Y ) = aX 2 + bXY + cY 2 has associated matrix F , then det F = ac − b4 = − d4 , where d is
the discriminant of f . In particular, this means that if f ∼ g then their discriminants are equal. Indeed, in
our perennial example f (X, Y ) = X 2 + Y 2 , it is not difficult to see that the discriminant of f is −4, as is the
discriminant of g.
Theorem 8.1.2 (Theorem 3.17, Niven) Let f ∼ g be binary quadratic forms, and let n ∈ Z. Then:
45
1. The representations of n by f are in one-to-one correspondence with the representations of n by g.
2. The proper representations of n by f are in one-to-one correspondence with the proper representations of
n by g.
Proof :
1. If f (x, y) = n, then ~xT F ~x = (n), and so with M T F M = G we have (M~x)T G(M~x) = (n). This process is
invertible, whence we deduce the result.
2. In the calculation in the proof of the first statement, if m|x and m|y then m divides both entries of M~x,
and conversely.
We seek to understand the structure of the equivalence classes of binary quadratic forms of discriminant d,
which our work above shows to be partitioned by ∼. We begin by showing that every equivalence class contains
a “nice” form; that is, roughly speaking, one in which b is the smallest coefficient in absolute value and c the
largest.
Definition: Let f (X, Y ) = aX 2 + bXY + cY 2 be a binary quadratic form. Then f is said to be reduced if
one of the following conditions hold:
1. −|a| < b ≤ |a| < |c|.
2. 0 ≤ b ≤ |a| = |c|.
46
8.2 Lecture Twenty-One
Recall from last time the notion of a reduced binary quadratic form; there is an algorithm for converting any
given binary quadratic form f into an equivalent, reduced binary quadratic form.
Example: We will reduce f = f0 (X, Y ) = 53X 2 + 152XY + 109Y 2 , which corresponds to the matrix F =
53 76
. For n ∈ Z, let
76 109
1 n 0 1
Tn = ,S = .
0 1 −1 0
We note that if F1 is defined via
T
T 1 −1 53 76 1 −1 53 23
F1 = T−1 F0 T−1 = = ,
0 1 76 109 0 1 23 10
which corresponds to the form f1 (X, Y ) = 53X 2 + 46XY + 10Y 2 . Next, we set
T
T 0 1 53 23 0 1 10 −23
F2 = S F1 S = = ,
−1 0 23 10 −1 0 −23 53
47
We observe that if a binary quadratic form does not satisfy the premises of (A), (B), or (C), then it is reduced;
thus it suffices to show that the algorithm terminates.
Since d is assumed not to be a perfect square we know that as 6= 0 for any s. We see that (A) is never followed
by (A), nor (B) by (B), nor (C) by (C), and moreover since the output of (C) is reduced by construction it
remains only to show that we cannot have an infinite loop (A) followed by (B) followed by (A), and so on. But
this is clear, since every time we apply step (A), |as | decreases, and so the well-ordering axiom implies that the
algorithm terminates.
Note that if d is a perfect square, then applying the above algorithm may obtain as = 0, meaning that none of
the steps (A), (B), or (C) is triggered unless as = bs = cs = 0.
Theorem 8.2.2 (Theorem 3.19, Niven) Let d ∈ Z with d not a perfect square, and let f (X, Y ) = aX 2 + bXY +
cY 2 be a reduced binary quadratic form of discriminant d. Then:
q
1. If d > 0 then ac < 0 and 0 < |a| < d2 .
q
2. If d < 0 then ac > 0 and 0 < |a| < |d|3 .
It is an immediate consequence of this theorem that there are only finitely many equivalence classes of bi-
nary quadratic forms of discriminant d, as there are only finitely many such reduced forms: indeed, we must
have
p b2 − d
0 ≤ |b| ≤ |a| ≤ |d|, c = .
4a
The proof will be given in the next lecture; today, we end with the following definition.
Definition: Let d ∈ Z with d not a perfect square. The number of equivalence classes of binary quadratic
forms of discriminant d is called the class number of d and is denoted H(d).
48
8.3 Lecture Twenty-Two
Recall theorem 8.2.2 from last time. Today, we prove the second assertion of the theorem.
Proof : (of Theorem 8.2.2, part (2)) Since d < 0 we know that ac > 0, as b2 − 4ac < 0, so in particular |a| > 0.
Then
|d| = −d = 4ac − b2 = 4|ac| − b2 .
Since f is reduced, we have that |b| ≤ |a| ≤ |c|, and so
a b c valid?
7
1 0 4 no
1 1 2 yes
−7
−1 0 4 no
−1 1 −2 yes
(where the last column indicates whether or not aX 2 + bXY + cY 2 is a valid binary quadratic form). It follows
from this that H(−7) ≤ 2. Since the discriminant is negative, it follows that both of the binary quadratic
forms
f (X, Y ) = X 2 + XY + 2Y 2 , g(X, Y ) = −X 2 + XY − 2Y 2
are (positive or negative) definite, and a calculation shows that f (1, 1) = 4 > 0, g(1, 1) = −2. Thus f is positive
definite, g is negative definite, and so in particular f 6∼ g and we have that H(−7) = 2.
Note that for any binary quadratic form of discriminant d, we have that d = b2 − 4ac ≡ b2 mod 2, so b must
have the same parity as d.
Example: Which primes are represented by the reduced form f found in our example above?
By theorem 7.2.2 we have that n is properly represented by some binary quadratic form of discriminant −7
if and only if there exists a solution to the congruence x2 ≡ −7 mod 4|n|. If n > 0, then x2 ≡ −7 mod 4n
implies that n is properly represented by f , since f is the only positive definite reduced binary quadratic form
of discriminant −7. Furthermore, if n = p is prime, then every representation of p is proper.
For p = 2, take (x, y) = (0, 1) so that f (x, y) = 2. For odd p, we see that f represents p if and only if
x2 ≡ −7 mod p has a solution, by the Chinese remainder theorem. If p = 7 this is clear; otherwise,
p
• If p ≡ 1 mod 4 then −7 −1 7
p = p p = 7 .
p
• If p ≡ 3 mod 4 then −7 −1 7
p = p p = 7 .
The quadratic residues modulo 7 are 1, 2, and 4; thus p is represented by f if and only if p ≡ 0, 1, 2 or
4 mod 7.
49
Theorem 8.3.1 (Theorem 3.25, Niven) Let f (X, Y ) = aX 2 + bXY + cY 2 , g(X, Y ) = a0 X 2 + b0 XY + c0 Y 2 be
reduced, positive definite binary quadratic forms. If f ∼ g, then f = g.
Proof : Exercise.
Consequently, if d < 0 then H(d) equals the number of reduced binary quadratic forms of discriminant d, which
is twice the number of such positive definite forms.
p
[Aside: there is also the notion of the class number of a number field; when d < 0, the class number of Q( −|d|)
equals 12 H(d).]
50
9 Week Nine
Note that if z = a + ib, w = c + id are complex numbers, then the above formula states exactly that |z|2 |w|2 =
|zw|2 . Thus, the binary quadratic form f (X, Y ) = X 2 + Y 2 has a “composition law” given by
in particular, this implies that the set of numbers represented by f is multiplicatively closed. Can we generalize
this idea to arbitrary binary quadratic forms?
Example: Let d = −7. We saw last week that the single equivalence class of positive definite binary quadratic
forms of discriminant −7 is represented by the reduced form f (X, Y ) = X 2 + XY + 2Y 2 . We factor over the
complex numbers, using the quadratic formula:
√ ! √ !
1+i 7 1−i 7
f (a, b) = a + b a+ b .
2 2
which implies
f (a, b)f (c, d) = f (ac − 2bd, ad + bc + bd),
and again we see that the set of represented values is multiplicatively closed.
Example: Suppose d = −20. In assignment 4, we verify that there are exactly two positive definite reduced
binary quadratic forms of discriminant −20, namely
Observe that the set of values represented by f− is not multiplicatively closed, as indeed
and thus f− (x, y) = 6 implies that (2x + y)2 + 5y 2 = 12, which is never satisfied, as can easily be verified
by checking possible values of x and y. In particular, this means that there is no multiplicative formula (or
“composition law”) for f− as there were for our previous examples.
Does such a formula exist for f+ ? The identity
√ √ √
(a + i 5b)(c + i 5d) = (ac − 5bd) + i 5(ad + bc)
51
implies
f+ (a, b)f− (c, d) = f+ (ac − 5bd, ad + bc).
We see that if we factor f− using the quadratic formula, we obtain
√ ! √ ! √ ! √ !
1+i 5 1−i 5 √ 1+i 5 √ 1+i 5
f− (a, b) = 2 a + b a+ b = 2a + b 2a + b .
2 2 2 2
which implies
f− (a, b)f− (c, d) = f+ (2ac + ad − 2bd, ad + bc + bd).
What happens if we consider the product f+ (a, b)f− (c, d)? The relevant calculation is
√ ! √
√ √ 1+i 5 √ 1+i 5
a + i 5b 2c + d = 2(ac + 2bc − 3bd) + (ad + 2bc + bd),
2 2
hence
f+ (a, b)f− (c, d) = f− (ac + 2bc − 3bd, ad + 2bc + bd).
Thus we have obtained the following “multiplication table”:
f+ f−
f+ f+ f−
f− f− f+
The entries are understood to mean, for example, that the product of two numbers represented by f+ may also
be represented by f+ . In fact, this relation holds on the level of equivalence classes; that is, if f ∼ f+ , g ∼ f− ,
then f (a, b)g(c, d) = h(x, y) for some x, y linear combinations of a, b, c, d, and h ∼ f− .
In general, the set of equivalence classes of positive definite binary quadratic forms of negative discriminant is
a group under the operation of “multiplication” alluded to above. This is known as the class group.
This ends our discussion of binary quadratic forms; next, we will discuss arithmetic functions; that is,
complex-valued functions whose domain is N.
52
9.2 Lecture Twenty-Four
where f (X) ∈ Z[X]. The Chinese remainder theorem tells us that σf (n) is multiplicative, and indeed we observe
that
φ(n) = σX φ(n) −1 (n).
Properties of multiplicative functions: Suppose f is a multiplicative function.
• For every n, we have the formula Y
f (n) = f (pα ).
pα kn
53
In particular, f is determined by its values on prime powers. Conversely, any set map
f : {pk : p prime, k ∈ N0 } → C
is totally multiplicative.
Example: Let f (n) = (−1)n−1 , so that f (n) = 1 if n is odd and −1 if n is even. Then f is not totally
multiplicative, as for example
f (8) = −1 6= 1 = f (2)f (4);
(
1 if p is odd,
however, f (n) is multiplicative, and indeed f is induced by the map f (pα ) =
−1 if p = 2.
Example: The function f (n) = (−1)n is not multiplicative, and so in particular is not totally multiplica-
tive.
Theorem 9.2.3 (Theorem 4.4, Niven) Let f (n) be a multiplicative function and let
X
F (n) = f (d).
d|n
giving another proof of the fact that τ is multiplicative. Note that f is totally multiplicative, while F (n) is
not.
54
9.3 Lecture Twenty-Five
and indeed f (pk ) = 0 for k > 1. For composite numbers of the form pq where p, q are distinct primes, we
have
f (pq) = F (pq) − f (p) − f (q) − f (1) = 0 − (−1) − (−1) − 1 = 1 = f (p)f (q),
while for n = p2 q we have
The above calculations suggest that f is multiplicative, which motivates the following definition.
Definition: The Möbius function µ(n) is the multiplicative function satisfying, for every prime p,
(
−1 if α = 1,
µ(pα ) =
0 if α > 1.
Equivalently: if n is not squarefree, then µ(n) = 0. Otherwise, writing n = p1 p2 · · · pk with pj distinct primes,
one has µ(n) = (−1)k .
Notation: Denote by ω(n) the number of distinct prime divisors of n, and by Ω(n) the number of prime factors
of n counted with multiplicity.
For example, with n = 720 = 24 · 32 · 5, we have ω(n) = 3, Ω(n) = 4 + 2 + 1 = 5. With this notation, we may
define (
(−1)ω(n) if n is squarefree,
µ(n) =
0 otherwise.
55
Theorem 9.3.1 (Theorem 4.7, Niven) One has
X
µ(d) = ι(n).
d|n
This theorem is much more widely invoked than is the definition of µ(n).
Proof : We give two proofs.
1. Both sides of the equation are multiplicative by theorem 9.2.3, and we already know that both sides agree
when n is a prime power, from which we deduce the result.
2. By definition, X X
µ(d) = (−1)ω(d) ,
d|n d|n,
d squarefree
k
and so if ω(n) = k then there are exactly j squarefree divisors d of n with ω(d) = j. Thus
k
(
X X k 1 if n = 1,
µ(d) = (−1)j = (1 − 1)k =
j 0 if n > 1,
d|n j=0
For example, for any multiplicative function f (n), we have f (12) = F (12) − F (6) − F (4) + F (2).
Proof : The right-hand side of the equation is
X n X X X
µ(d)F = µ(d) f (δ) = µ(d)f (δ)
d n
d|n d|n δ| d dδ|n
X X X n
= f (δ) µ(d) = f (δ)ι = f (n),
δ
δ|n d| n
δ
δ|n
where we have used the result of theorem 9.3.1, and the result folllows.
56
10 Week Ten
that is,
φ(n) X µ(d)
= .
n d
d|n
Theorem 10.1.1 (Theorem 4.9, Niven) Let F (n) be an arithmetic function and define
X n
f (n) = µ(d)F .
d
d|n
Then X
F (n) = f (d).
d|n
Proof : We have
X X X d
f (d) = µ(δ)F .
δ
d|n d|n δ|d
d
Writing d = δ δ , we have
X X X d X n
f (d) = F (δ) µ = F (δ)ι = F (n),
d n
δ δ
d|n δ|n | δ|n
δ δ
57
and we are done.
Definition: Let f (n), g(n) b two arithmetic functions. Their Dirichlet convolution, denoted f ∗ g, is
defined X n
(f ∗ g)(n) = f (d)g .
d
d|n
(The function g is sometimes written 1.) In particular, this means that id = φ ∗ 1, ι = µ ∗ 1, and τ = 1 ∗ 1.
With this notation, we may restate the Möbius inversion formula as: F = f ∗ 1 if and only if f = F ∗ µ.
Theorem 10.1.2 If f and g are multiplicative functions, then f ∗ g is multiplicative.
Note that this theorem is a generalization of theorem 9.2.3.
Proof : If (m, n) = 1, then mn
X
(f ∗ g)(mn) = f (d)g .
d
d|mn
For each divisor d of mn, we may uniquely factor d = d1 d2 with d1 |m and d2 |n. Thus
XX
XX mn m n
(f ∗ g)(mn) = f (d1 d2 )g = f (d1 )g f (d2 )g
d1 d2 d1 d2
d1 |m d2 |n d1 |m d2 |n
X m X n
= f (d1 )g f (d2 )g = (f ∗ g)(m)(f ∗ g)(n),
d1 d2
d1 |m d2 |n
as claimed.
[Structural remarks: Let A = {f : N → C} be the set of arithmetic functions and let A× = {f ∈ A : f (1) 6= 0};
then (A× , ∗) forms an abelian group. In this group, ι is the identity and 1−1 = µ, which yields yet another
statement of the Möbius inversion formula:
F = f ∗ 1 ⇔ µ ∗ F = µ ∗ (f ∗ 1) = f ∗ (µ ∗ 1) = f ∗ ι = f.
58
Note that s is multiplicative, and is characterized by
(
1 if 2 | α,
s(pα ) =
0 if 2 - α.
Moreover, µ2 is multiplicative, as the product of two multiplicative functions; hence f = s ∗ (µ2 ) is also
multiplicative. We compute:
X pα
α
f (p ) = s µ2 (d) = s(pα )µ2 (1) + s(pα−1 )µ2 (p) + · · · + s(1)µ2 (pα ) = s(pα ) + s(pα−1 ) = 1.
α
d
d|p
Thus there is a unique way to factor any n ∈ N as n = n0 s2 where n0 is squarefree. For example, if n = 2·32 ·53 ·74 ,
we have n = (2 · 5)(3 · 5 · 72 )2 .
59
10.2 Lecture Twenty-Seven
Let us assign names to these values, so that f (1) = a0 , f (p) = a1 , f (p2 ) = a2 , . . ., and similarly g(1) = b0 , g(p) =
b1 , g(p2 ) = b2 , . . . We obtain the following table:
We observe the similarity with the coefficients of the product of power series:
∞
! ∞ ! ∞
X X X
α α α α
f (p )X g(p )X = (f ∗ g)(pα )X α .
α=0 α=0 α=0
φ(n) X
= f (d),
n
d|n
µ(n)
That is, f (n) = n , as before.
60
Example: Define a multiplicative function r via
2 if p ≡ 1 mod 4,
0 if p ≡ 3 mod 4,
r(pα ) =
1 if p = 2 and α = 1,
0 if p = 2 and α > 1.
Now, define R = r ∗ s, where s is the indicator function of the perfect squares from lecture twenty-six; note that
R is multiplicative. Determine the values of R(pα ).
[Aside: Theorem 3.2.2 of Niven tells us that the number of proper representations of n by the binary quadratic
form X 2 + Y 2 equals 4r(n). In the statement of theorem 6.3.3 originally given, there was an error, in that we
forgot the necessary condition that 4 - n.
2 2
Note also that any representation x2 + y 2 = n corresponds to a proper representation xd + yd = dn2 , where
d = (x, y). Thus if Sn denotes the set of representations of n by X 2 + Y 2 , and Snp ⊂ Sn denotes the subset of
proper representations, then
X p
X n X n
#Sn = #Sn/g2 = 4r = 4 r s(d) = 4(r ∗ s)(n) = 4R(n).
2 2
g2 d
g |n g |n d|n
Note in particular that Niven’s functions R and r correspond to our 4R and 4r, respectively.]
First, we assume that p ≡ 1 mod 4. We get the table
In fact, we can prove that R(pα ) = α + 1 for any p ≡ 1 mod 4: if α is even then
α
X X X α
α j α−j α j
R(p ) = r(p )s(p ) = r(1)s(p ) + r(p ) = 1 + 2=1+2 = α + 1.
2
j=0 1≤j≤α, 1≤j≤α,
α even α even
A similar proof works for α odd, and is left as an exercise. Now, suppose p ≡ 3 mod 4; we obtain
61
On these primes, r acts like s, so the restriction of r ∗ s to the primes congruent to 3 modulo 4 is simply s.
Finally, suppose p = 2; the table this time is
On these prime powers, r acts like µ2 , so R acts like µ2 ∗ s = 1. Thus we conclude that R is the multiplicative
function generated by
α+1 if p ≡ 1 mod 4,
1 if p ≡ 3 mod 4 and α is even,
R(pα ) =
0
if p ≡ 3 mod 4 and α is odd,
1 if p = 2.
One consequence of this fact is that R(n) = 0, or
62
10.3 Lecture Twenty-Eight
Example: Let R(n) be the multiplicative function from the last lecture, generated by
α + 1 if p ≡ 1 mod 4,
α
1 if p ≡ 3 mod 4 and α is even,
R(p ) =
0 if p ≡ 3 mod 4 and α is odd,
1 if p = 2.
X
Find a function g such that R(n) = g(d).
d|n
nb. We defined
X n X n
R(n) = r = r s(d).
2
g2 d
g |n d|n
Note that, since R = g ∗ 1, the Möbius inversion formula implies that g = R ∗ µ, and since R and µ are both
multiplicative, we know that g is as well. We observe that
X pα
α
g(p ) = R µ(d) = R(pα )µ(1) + R(pα−1 )µ(p) + · · · + R(1)µ(pα ) = R(pα ) − R(pα−1 ).
α
d
d|p
Thus:
• If p ≡ 1 mod 4 then g(pα ) = (α + 1) − α = 1.
(
α 1−0=1 if α is even,
• If p ≡ 3 mod 4 then g(p ) =
0 − 1 = −1 if α is odd.
• If p = 2 then g(pα ) = 1 − 1 = 0.
Remarks:
• Since g(pα ) = g(p)α for every prime p and positive integer α, it follows that g is totally multiplicative.
• On odd primes, g(p) equals the Legendre symbol −1
p , and hence on odd n, g(n) equals the Jacobi symbol
n−1
−1
n . Thus, for odd n, g(n) = (−1)
2 .
Consequently, X
R(n) = g(d) = #{d|n : d ≡ 1 mod 4} − #{d|n : d ≡ 3 mod 4}.
d|n
P
Some miscellany: Recall that σ(n) = d|n d = 1∗ id. The Greeks defined a perfect number to be a number
n whose proper divisors sum to n itself; that is, a number satisfying
For example, 6 is perfect, as 6 = 1 + 2 + 3, as is 28 = 1 + 2 + 4 + 7 + 14. The next perfect number is 496, then
8128. Note that σ(n) is multiplicative, and that
pα+1 − 1
σ(pα ) = 1 + p + p2 + · · · + pα = .
p−1
63
We see equivalently that n is a perfect number if and only if
σ(n) Y pα+1 − 1
2= = .
n α
pα (p − 1)
p kn
σ(2p−1 q) = σ(2p−1 )σ(q) = (2p − 1)(q + 1) = 2p (2p − 1) = 2(2p−1 )(2p − 1) = 2(2p−1 q),
Hence (2k − 1)|2k m, so by Euclid’s lemma we have that (2k − 1)|m. Writing m = (2k − 1)l, we have 2k l = σ(m);
but l and m are both divisors of m, so
64
11 Week Eleven
Diophantine approximation is the technique of finding rational numbers near given real numbers. One
fundamental fact of Diophantine approximation that we will use frequently is that, if n ∈ Z and n 6= 0,
then |n| ≥ 1.
Example: Define
∞
X 1
e= ;
n!
n=0
we will prove that e is irrational. Indeed, assume not, and choose a, b ∈ Z, b > 0 such that e = ab . Then be ∈ Z
and so in particular b!e ∈ Z. Thus we define
b ∞
X b! X 1
m = b!e − = b! ∈ Z.
n! n!
n=0 n=b+1
Clearly m > 0, and moreover in the last sum we see that every term is at most half the previous term, thus
∞ ∞
X 1 X 1 1 2b! 2
m = b! < b! · n−(b+1) = = ≤ 1.
n! (b + 1)! 2 (b + 1)! b+1
n=b+1 n=b+1
That is,
m ∈ Z and 0 < m < 1,
which is a contradiction. Thus e ∈
/ Q.
Lemma 11.1.1 If ab , dc are distinct rational numbers, then ab − dc ≥ 1
|bd| .
Theorem 11.1.2 (Theorem 6.8, Niven; Dirichlet’s theorem on Diophantine approximation) Let x ∈ R, n ∈ N.
Then there exists ab ∈ Q with 1 ≤ b ≤ n and |x − ab | ≤ b(n+1)
1
.
1 a bjxc
whose disjoint union is [0, 1). If some {jx} ∈ [0, n+1 ), then let b = j ; we have
a jx bjxc {jx} 1 1
x − = − = < = .
b j j j j(n + 1) b(n + 1)
65
n a bjxc+1
Similarly, if some {jx} ∈ [ n+1 , 1) then we may take b = j , and we have
a bjxc + 1 jx 1 − {jx} 1
n+1 1
− x = − = < = .
b j j j j b(n + 1)
Finally, if neither of these cases occur, then by the pigeonhole principle there exists some subinterval containing
1
{jx} and {kx} with j < k (say), so that |{jx} − {kx}| < n+1 . Then, with a = bkxc − bjxc, b = k − j, we
have
1
a (k − j)x bkxc − bjxc |{kx}{jx}|
n+1
x − = − = < ,
b b b b b
and we are done.
a
Corollary 1: If x ∈ R \ Q, then there exist infinitely many b ∈ Q such that |x − ab | < 1
b2
.
Proof : Theorem 11.1.2 gives, for every n ∈ N, a rational number abnn with 1 ≤ bn ≤ n and
an 1 1
0 < x − ≤ < 2.
bn bn (n + 1) bn
Definition: Let α ∈ R. We say that α is algebraic of degree d if there exists an irreducible polynomial
p(X) ∈ Z[X] such that p(α) = 0. If α is not algebraic, then α is said to be transcendental.
√
For example, 2 is algebraic of degree 2, as it is a root of X 2 − 2. Furthermore, α is algebraic of degree 1 if
and only if α ∈ Q.
Theorem 11.1.4 (Liouville’s theorem on Diophantine approximation) Let α be algebraic of degree d. Then
there exists some constant C = C(α) > 0 such that, for any ab ∈ Q, ab 6= α, we have
a C(α)
α − ≥ d .
b b
Proof : By taking C(α) ≤ 1 we may assume that ab satisfies |α− ab | ≤ 1. Choose p(X) ∈ Z[X] to be irreducible
of degree d and such that p(α) = 0. Then we must have p ab 6= 0 and so by lemma 11.1.3 that |p ab | ≥ b1d .
But a a a
p = p − p(α) = − α p0 (t),
b b b
66
for some t between α and ab , by the mean value theorem. Thus, taking
1
C(α) = ,
max{p0 (t) : t ∈ [α − 1, α + 1]}
we obtain
1 a a
0
a 1
≤ p = − α p (t) ≤ − α · ,
bd
b
b
b C(α)
and we are done.
It was using this theorem that Liouville first demonstrated (1844) the existence of transcendental numbers.
This work preceded by several decades Cantor’s investigation of uncountable sets, which yields a simpler albeit
non-constructive proof of the existence of transcendental numbers.
67
11.2 Lecture Thirty
We note that each summand is at most half the previous one, thus
∞ ∞
α − ak = 1 2
X X
−n!
10−(k+1)! n−(k+1) = (k+1)! .
10 ≤
bk 2 10
n=k+1 n=k+1
If α were algebraic of degree d, then for some constant C(α) > 0 we would have
C(α) ak 2
d
≤ α − ≤ k+1 ,
bk bk bk
If we know the first few elements of Fn , how can we compute the next?
Proposition 11.2.2 Let a
b ∈ Fn with a 6= b. The next element of Fn after a
b is x
y, where y ≡ −a−1 mod b, n −
ay+1
b < y ≤ n, and x = b .
68
Proof : Since ay + 1 ≡ a(−a−1 ) + 1 ≡ 0 mod b, we know that x ∈ Z. Moreover since y ≤ n and 1 ≤ y(b − a),
we know
x ay + 1 by
= ≤ = 1,
y by by
x c a c
and thus y ∈ Fn . Now, suppose d ∈ Fn with b < d < xy . Then
x c c a bx − ay 1
− + − = = .
y d d b yb yb
For example,
0 1 1 1 2 3
F4 = , , , , , ,1 .
1 4 3 2 3 4
The fractions of F5 \ F4 are exactly
1 0+1 2 1+1 3 1+2 4 3+1
= , = , = , = ,
5 1+4 5 3+2 5 2+3 5 4+1
which are seen to lie in the respective intervals
0 1 1 1 1 2 3 1
, , , , , , , .
1 4 3 2 2 3 4 1
Next lecture, we will use the Farey fractions to give an alternate proof of Dirichlet’s theorem.
69
11.3 Lecture Thirty-One
b c
In the Farey fractions Fn of order n, we have that if r < s are consecutive, then
b b+c c
rc − sb = 1 and < < with r + s ≥ n + 1.
r r+s s
Indeed, the condition r + s ≥ n + 1 is necessary for our second result, otherwise the middle fraction is itself a
Farey fraction, a contradiction.
Recall: Dirichlet’s theorem on Diophantine approximation (theorem 11.1.2), which states that if x ∈ R, n ∈ N,
then there exists aq ∈ Q with 1 ≤ q ≤ n and |x − aq | ≤ q(n+1)
1
.
a b c
Proof : If α ∈ Fn , then take q = α. Otherwise, choose r < s to be consecutive in Fn such that
b c
<α< ,
r s
by replacing α with {α} if necessary. We now have two cases.
1. Suppose
b b+c
<α≤ ,
r r+s
a
and take q = rb . We have
α − b b + c b cr − bs 1 1
≤ − = = ≤ ,
r r+s r r(r + s) r(r + s) r(n + 1)
and by assumption 1 ≤ r ≤ n.
2. If instead we have
b+c c
≤α< ,
r+s s
a
we instead take q = sc , and the proof unfolds in the same way.
§7.1 – The Euclidean algorithm
We can think of continued fractions as a consequence of the Euclidean algorithm.
Example: We find (76, 26). Simple calculation shows
73 = 2 · 26 + 21,
26 = 1 · 21 + 5,
21 = 4 · 5 + 1,
5 = 5 · 1 + 0.
73 1 1
=2+ =2+ .
26 5 1
1+ 1+
21 1
4+
5
70
This is an example of the type of expression we will now study.
Definition: A continued fraction is an expression of the form
1
x0 + ,
1
x1 +
1
x2 +
.. 1
.+
xj
where xi ∈ R and x0 , x1 , . . . , xj > 0; we will mostly be interested in the situation when xi ∈ Z for every i. We
have the shorthand notation hx0 ; x1 , x2 . . . , xj i. For example,
76 26 21
= 2; = 2; 1, = h2; 1, 4, 5i .
23 21 5
1 1 1 6x + 1 29x + 5
h1; 3, 1, 5, xi = 1 + =1+ =1+ =1+ = .
1 1 5x + 1 23x + 4 23x + 4
3+ 3+ 3+
1 x 6x + 1
1+ 1+
1 5x + 1
5+
x
We may write the above calculation more compactly as
5x + 1 6x + 1 23x + 4 29x + 5
h1; 3, 1, 5, xi = 1; 3, 1, = 1; 3, = 1; = .
x 5x + 1 6x + 1 23x + 4
71
• a0 < b0 , or
• a0 = b0 and a1 > b1 , or
• a0 = b0 and a1 = b1 and a2 < b2 , or . . .
Thus we have an alternating lexicographic ordering on the integral continued fractions. To compare
ha0 ; a1 , a2 , . . . , ak i to ha0 ; a1 , a2 , . . . , al i with k < l, we write, formally,
ha0 ; a1 , a2 , . . . , ak i = ha0 ; a1 , a2 , . . . , ak , ∞i .
ha0 ; a1 , a2 , . . . , ak i = ha0 ; a1 , a2 , . . . , ak − 1, 1i .
Notation: For the Euclidean algorithm applied to the pair (u0 , u1 ), we write
u0 = u1 a0 + u2 , 0 < u2 < u1 ,
u1 = u2 a1 + u3 , 0 < u3 < u2 ,
..
.
uk−1 = uk ak−1 + uk+1 , 0 < uk+1 < uk ,
uk = uk+1 ak + uk+2 , 0 = uk+2 < uk+1 .
We call the ai coefficients partial quotients. We have equivalently
u0 1 u0
= a0 + , a0 = ,
u1 u1 /u2 u1
u1 1 u1
= a1 + , a1 = ,
u2 u2 /u3 u2
..
.
u0 uk uk
= ak , a k = = .
u1 uk+1 uk+1
Similarly, we have for example
u1 1 1
= n o = u0 − a0 .
u2 u0
u1
u1
72
12 Week Twelve
73
Note that r0 = 1, r1√= 1.3333 . . . , r2 = 1.25, r3 = 1.26087 . . ., so that the convergents are indeed good rational
approximations to 3 2 = 1.25992 . . ..
Theorem 12.1.1 (Theorem 7.3, Niven) For any x > 0, we have that
xhj−1 + hj−2
ha0 ; a1 , a2 , . . . , aj−1 , xi = .
xkj−1 + kj−2
In particular,
aj hj−1 + hj−2 hj
ha0 ; a1 , a2 , . . . , aj−1 , aj i = = .
aj kj−1 + kj−2 kj
x·1+0
Proof : We use induction. In the j = 0 case we have that hxi = 0·x+1 which is clearly so, and thus we may
assume the claim holds up to j. We have
Fj+1 j→∞
h1; 1, 1, . . . , 1i = −→ ϕ,
| {z } Fj
j copies
√
1+ 5
where ϕ = 2 = 1.618033 . . . is the golden ratio.
Theorem 12.1.2 (Theorem 7.5, Niven) For j ≥ −1 one has hj kj−1 − kj hj−1 = (−1)j−1 . In particular, this
means that (hj , kj ) = 1 for every j and that
(−1)j−1
rj − rj−1 = .
kj kj−1
74
and we are done.
Note that aj+1 ≤ ξj+1 < aj+1 + 1. Given n ∈ N, then choosing j so that kj ≤ n < kj+1 , then we can show
that
ξ − hj ≤ 1
.
kj kj (n + 1)
Thus every convergent rj confirms Dirichlet’s theorem on Diophantine approximation. We may also restate the
theorem thus:
ξ − hj = 1 · 1 kj−1
2 , where aj+1 ≤ ξj+1 + ≤ aj+1 + 2.
kj kj ξj+1 + kj−1 /kj kj
Hence, the greater aj+1 , the better the approximation rj = ha0 ; a1 , a2 , . . . , aj i is to ξ.
75
12.2 Lecture Thirty-Three
76
Proof : For simplicity we will assume that the continued fraction is purely periodic, although the stronger claim
is true; that is, assume
ξ = ha0 ; a1 , a2 , . . . , aj−1 i.
Then
ξhj−1 + hj−2
ξ = ha0 ; a1 , a2 , . . . , aj−1 , ξi = ,
ξkj−1 + kj−2
hence ξ(ξkj−1 + kj−2 ) = ξhj−1 hj−2 , and so
√
Lemma 12.2.2 Every real quadratic irrational
√
r + s c, where r, s ∈ Q and c ∈ N is not a perfect square
m+ d
(written c ∈ N \ N ) can be written q , where m, q ∈ Z, d ∈ N \ N2 , and q|(d − m2 ).
2
77
(3) ⇒ (1) Highly nontrivial, and omitted.
√
Theorem 12.2.4 (Theorem 7.21, Niven) Let d ∈ N \ N2 and set c = d. Then bcc + c has a purely periodic
continued fraction ha0 ; a1 , a2 , . . . , ar−1 i with a0 = 2c. Hence c = hc; a1 , a2 , . . . , ar i where ar = 2c.
√
We refer to our earlier example, where we found that 6 + 41 has a purely periodic continued fraction.
Proof : (omitted)
√
Facts: If ξ = d and qj are defined as above, then:
• For every j we have qj 6= −1.
• If r is the period of the continued fraction of ξ, then qj = 1 if and only if r | j.
78
12.3 Lecture Thirty-Four
Notation: Throughout this lecture, d denotes a positive√integer that is not a perfect square. The symbols
aj , hj , kj denote the terms from The Process applied to d, and similarly for mj , qj .
Pell’s equation: We are interested in integer solutions to the equation x2 − dy 2 = N for some fixed N ∈ Z; in
particular, we seek solutions where both x and y are positive.
√
Theorem 12.3.1 (Theorem 7.24, Niven)√If |N | < d, then for any positive solution (x, y) to Pell’s equation
we must have that xy is a convergent to d. In particular, if (x, y) = 1 then we must have that x = hj and
y = kj for some j.
Proof : (omitted)
√
Example: Every solution of x2 − 41y 2 = −1 must come from a convergent of 41. We saw in our last lecture
that in this case h2 = 32, k2 = 5, and indeed
Theorem 7.22 of Niven gives us the following key identity: for j ≥ −1, one has h2j − dkj2 = (−1)j+1 qj+1 . At
the√end of our last lecture we saw that qj = 1 if and only if r|j, where r is the period of the continued fraction
of d. It is a corollary (Corollary 7.23) that, for every l ≥ 0, we have
h2lr−1 − dklr−1
2
= (−1)lr .
79
from which it follows that
√ √
AB = ((su + dtv) − d(sv + tu))((su + dtv) + d(sv + tu)) = (su + dtv)2 − d(sv + tu)2 .
√
In particular, if A = 1, then we get new solutions to the equation x2 − dy 2 = A by considering (s + t d)l with
l ≥ 2.
Example: Suppose d = 45. Set s = 161, t = 24 so that s2 − dt2 = 1. We have
√ √ √ √
(161 + 24 45)2 = 51841 + 7728 45, (161 + 24 45)3 = 16, 692, 641 + 2, 488, 392 45,
and indeed
16, 692, 6412 − 45 · 2, 488, 3922 = 1, h17 = 16, 692, 641, k17 = 2, 488, 392.
Proof : (omitted)
Theorem 12.3.3
√ (Theorem 7.26, Niven) Set x1 = hr−1 , y1 = kr−1 , where r is the period of the continued
fraction of d. Define xl , yl recursively via
√ √
xl + yl d = (x1 + y1 d)l .
80
13 Week Thirteen
Miscellany about continued fractions: Given an arbitrary continued fraction, must it correspond to a real
number? Let a0 ∈ Z, a1 , a2 , . . . ∈ N, and define
Theorem 13.1.1 The limit L always exists and is irrational. Moreover, the partial quotients of L are exactly
a0 , a1 , a2 , . . .
Recall: If rn denotes the nth convergent of L, we have rn = ha0 ; a1 , . . . , an i and moreover
(−1)n−1
rn − rn−1 = .
kn kn−1
1
This implies that the convergents oscillate around L. Indeed, define αn = kn kn−1 so that
n
X
rn = a0 + (−1)j−1 αj ;
j=1
as a decreasing, alternating series, we know that this series converges and thus that the convergents also
converge.
Example: Define x = h1; 1, 1, . . .i so that x = 1 + x1 . This yields the quadratic equation x2 − x − 1 = 0 and
√
1+ 5
since x > 0 we deduce that x = 2 = ϕ, as introduced in lecture thirty-two. With the Fibonacci numbers as
defined there, we have
1
Fn = √ (ϕn − (−ϕ)n ), and m|n ⇒ Fm |Fn .
5
Definition: A real number is called simply normal in base-10 if, for every i ∈ {0, 1, . . . , 9}, the probability
of randomly selecting an i in its decimal expansion is 0.1.
There is an analogous definition for simple normality in base-b. A real number is normal base-b if it is simply
normal base-b, base-b2 , base-b3 , and so on. For example, 0.0123456789 is simply normal base-10, but not
normal.
Theorem 13.1.2 Almost all real numbers are normal base-10.
Champernowne’s number: Let c = 0.12345678910111213 . . . D.G. Champernowne showed in 1933 that c is
normal base-10.
It is conjectured that the following numbers are normal: π, e, log 2, and any q ∈ Q of degree at least 3.
It is a trivial consequence of theorem 13.1.2 that almost all real numbers are normal in every base simultane-
ously.
Back to continued fractions: given ξ ∈ R, define
#{n ≤ x : an = k}
δk (ξ) = lim .
x→∞ x
1
Aleksandr Khinchin showed that, for almost all ξ ∈ R, δk (ξ) exists and equals log2 (1 + k(k+2) ), thus
81
One number which fails this test is
e = h2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, 1, 10, 1, . . .i
Theorem 13.1.3 (Theorem 7.17, Niven) For all ξ ∈ R \ Q, there exist infinitely many ab ∈ Q such that
√
|ξ − ab | < √5b
1
2 , and moreover 5 is the best possible such bound.
√
By discarding the (countable) set of real numbers ξ for which the bound 5 is necessary, we may improve the
√ √
221
√
1517
bound to 8; repeating this process we obtain bounds of 5 , 13 , . . . These numbers arise naturally in the
study of the Markov spectrum.
Theorem 13.1.4 (Theorem 7.14, Niven) If |ξ − ab | < 1
2b2
, then a
b is a convergent to ξ.
82
13.2 Lecture Thirty-Six
log(3/2)
log2 (3/2) = = 0.58496 . . . = h0; 1, 1, 2, 2, 3, 1, 5 . . .i,
log 2
with convergents
1 3 7 24
1, , , , , . . .
2 5 12 41
83
So if we wanted to divide the octaves into x notes so that an interval of y of them make a perfect fifth, we
would be better to take x = 41, y = 24.
Pythagorean triplets: What are all positive integer solutions to the equation x2 + y 2 = z 2 ? A primitive
triplet is a solution to this equation in which (x, y) = 1.
Theorem 13.2.1 (Theorem 5.5, Niven) The positive, primitive Pythagorean triplets (with y even) are param-
eterized by:
x = r2 − s2 , y = 2rs, z = r2 + s2 ,
where r > s > 0, (r, s) = 1, and r and s have opposite parity.
nb. For any primitive (x, y, z), exactly one of x and y is even.
Proof : We give two sketches.
1. We may factor y 2 = (z − x)(z + x), hence
y 2 z+x z−x
= · , with ( x+z x−z
2 , 2 ) = 1.
2 2 2
By Euclid’s lemma, we must have that z+x 2 z−x
2 =r , 2 =s .
2
2 2
2. We have xz + yz = 1, and so we seek to find the rational points q of the unit circle. The line joining
any rational point q to (−1, 0) has rational slope; conversely, any line through (−1, 0) with rational slope
intersects the circle in a rational point:
1 − m2
2m
, , m ∈ Q.
1 + m2 1 + m2
The approach of proof (2) generalizes to arbitrary conic sections.
84
13.3 Lecture Thirty-Seven
• Hensel’s lemma.
• Solving linear congruences ax ≡ b mod m.
• The number of solutions of xn ≡ a mod p.
Example problems: Find all n ∈ Z such that 3n ≡ n mod 7. Show that aφ(n) ≡ a2φ(n) mod n for all a ∈ Z, n ∈ N.
Prove that a squarefree integer n is a Carmichael number if and only if (p − 1)|(n − 1) for every p|n.
Chapter Three – Quadratic Reciprocity and Quadratic Forms
• Sums of two squares.
• The law of quadratic reciprocity.
• Jacobi symbols, Legendre symbols; special known values of the same.
• Quadratic residues and nonresidues.
• Euler’s criterion.
• Binary quadratic forms
Example problem: In Z× n , prove that at most half of the elements are quadratic residues, and that exactly half
of them are quadratic residues if and only if n has a primitive root.
Chapter Four – Some Functions of Number Theory
• Multiplicative functions, totally multiplicative functions.
• Dirichlet convolution.
• Möbius inversion.
Chapters Six and Seven – Farey Fractions and Irrational Numbers; Simple Continued Frac-
tions
• Dirichlet’s theorem on Diophantine approximation.
85
• Farey fractions.
• Diophantine approximations to rational and algebraic numbers.
• Continued fractions.
• Pell’s equation.
86