Quadratic Reciprocity
Quadratic Reciprocity
Royce Yao
11 June 2023
§1 Units
We know that for each positive integer n ≥ 2, taking (mod n) allows us to get a group
Zn/Z under addition.
Elements of this group are representation for the entire set of elements with the same
remainder under division. This can be checked to be well-defined
[a]n = {. . . , a − k, a, a + k, . . . }.
[a]n + [b]n = [a + b]n
holds.
However, it can also be seen that
This raise a natural question: when we can do something similar for residues under
multiplication?
§1.1 Construction
Suppose that we naively take the case of Z6/Z and endow it with multiplication. While
[1]6 is an indentity element, and multiplication being associative carries over, we run into
a problem with inverses.
Both
hold, so there isn’t an inverse to [0]6 . As such, this isn’t a group. However, it turns
getting rid of the elements without these modular inverses gives a group.
Definition 1.1 (Modular Inverses). Let the modular inverse, if it exists, of [a]n be some
[b]n such that
[a]n · [b]n = [1]n .
An element with a modular inverse is called a unit.
1
Royce Yao — 11 June 2023 A Bad Intro to Quadratic Reciprocity
Example 1.2
Find the units when n = 6.
0 1 2 3 4 5
0 0 0 0 0 0 0
1 0 1 2 3 4 5
2 0 2 4 0 2 4
3 0 3 0 3 0 3
4 0 4 2 0 4 2
5 0 5 4 3 2 1
It turns out that only 1 and 5 seem to be units. They are also the only residues
relatively prime to 6. As a matter of fact, we can prove this.
G∼
= Ca1 × Ca2 × Ca3 · · · × Cak
However, this does not give us actual decompositions, it just guarenteeds the existence
of one.
A subcase is when Un is directly isomorphic to a cyclic group.
2
Royce Yao — 11 June 2023 A Bad Intro to Quadratic Reciprocity
Un ∼
= Cϕ(n)
In other words, there exists a g ∈ Un such that for each u ∈ Un , u = g k for some k.
Proofs of this can be decently elementary.
Un ∼
= Upe11 × Upe22 × · · · × Upek
k
This allows us to decompose units. Considering U2k in a bit more detail allows us to
get the cyclic group decomposition as promised.
Example 1.9
Find the number of integers 1 ≤ a ≤ 600 such 600 | a10 − 1.
Note that this is equivalent to the number of elements in U600 with order dividing 10.
We first decompose
U600 ∼
= U8 × U3 × U25 ∼
= C2 × C2 × C2 × C4 × C5
The order of an element is the same as the lcm of its order in each of the cyclic groups.
Thus, the order in each cyclic group componentwise divides 10. The answer is thus
2 · 2 · 2 · 2 · 1 = 16
§2 Quadratic Residues
A quadratic residue is the following
Definition 2.1 (Quadratic Residue). A residue is q is quadratic (mod n) if there exists
x such
x2 ≡ q (mod n)
Else, a residue is nonquadratic.
We use the abbreviations QR and NQR here.
3
Royce Yao — 11 June 2023 A Bad Intro to Quadratic Reciprocity
p−1
This gives us that there are 2 primitive roots.
Proposition 2.3
The product of two residues is a NQR if and only if exactly one of them is a NQR.
As such, Qn is a subgroup of Un .
Proposition 2.4
a ∈ Qp if and only if a ∈ Qpk for odd primes p.
Qn ∼
= Qpe11 × Qpe22 × · · · × Qpek
k
4
Royce Yao — 11 June 2023 A Bad Intro to Quadratic Reciprocity
Using this and the multiplication property allows us to simplify large Legendre symbols.
§3 Applications
Problem 3.1 (AIME I 2016/12). Find the least positive integer m such that m2 − m + 11
is a product of at least four not necessarily distinct primes.
Problem 3.2 (IMO 1986/1). Let d be any positive integer not equal to 2, 5 or 13. Show
that one can find distinct a, b in the set {2, 5, 13, d} such that ab − 1 is not a perfect
square.
Problem 3.3 (IMO 2005/4). Determine all positive integers relatively prime to all the
terms of the infinite sequence
an = 2n + 3n + 6n − 1, n ≥ 1.
Problem 3.4 (Christmas Theorem). Show that an odd prime p can be expressed as the
sum of two squares if and only if p is 1 (mod 4).
Problem 3.5. Let p be a prime and n a positive integer. Determine the remainder when
1n + 2n + · · · + (p − 1)n is divided by p, as a function of n and p.
1 1
Problem 3.6 (ARML 2022 I-10). The decimal expansion of the fraction 664349 = 27343·243
consists of an infinitely repeating block of n digits. Compute the least possible value of n.
Problem 3.7 (OMMC 2023 Final P8). Let p be a prime. Suppose the mean of the
nonzero quadratic residues mod p is less than p2 . Show that the median of the nonzero
quadratic residues mod p is less than p2 .