Number Theory: A Complete Summary of Definitions, Theorems, and Proofs
A single-article survey of undergraduate number theory. Covers divisibility, congruences, the Euclidean algorithm, primes, quadratic residues, arithmetic functions, continued fractions, p-adic valuations, and algebraic integers, together with all key algorithms and a dependency diagram.
This article provides a single-page panoramic view of undergraduate number theory. For each topic, we present the key definitions, major theorems, and algorithms in concise form.
How to use this page:
Newcomers: read the sections in order to build a coherent picture of the subject.
Review or exam preparation: jump to any section from the table of contents.
Quick algorithm lookup: Section 14, “ Theorem and Algorithm Directory,”{} collects all the major results in one list.
The dependency diagram below shows how the main topics are interrelated.
graph TD
A["Divisibility and Congruences"] --> B["GCD and the Euclidean Algorithm"]
A --> C["Primes and the Fundamental Theorem of Arithmetic"]
A --> D["Applications of Congruences and Group Structure"]
B --> D
C --> D
D --> E["Primitive Roots and Discrete Logarithms"]
B --> F["The Chinese Remainder Theorem"]
D --> F
D --> G["Quadratic Residues"]
E --> G
C --> H["Arithmetic Functions"]
B --> I["Continued Fractions"]
C --> J["Distribution of Primes"]
C --> K["p-adic Valuations"]
C --> L["Algebraic Integers"]
style A fill:#f5f5f5,stroke:#333,color:#000
style D fill:#f5f5f5,stroke:#333,color:#000
style F fill:#f5f5f5,stroke:#333,color:#000
style L fill:#f5f5f5,stroke:#333,color:#000
Remark 1.
This article is designed to accompany the “ Number Theory Textbook”{} series. Links at the end of each section point to the corresponding full-length chapter for detailed exposition and complete proofs.
2. Divisibility and Congruences
Definition 2 (Divisibility).
For integers a,b with b=0, we say bdividesa (written b∣a) if there exists an integer q such that a=bq.
Theorem 3 (Division algorithm).
For any integer a and any positive integer b, there exist unique integers q and r satisfying a=bq+r with 0≤r<b.
Definition 4 (Congruence).
For integers a,b and a positive integer m, we write a≡b(modm) and say a is congruent to b modulo m if m∣(a−b).
Theorem 5 (Basic properties of congruences).
Congruence modulo m is an equivalence relation that is compatible with addition and multiplication:
3. The Greatest Common Divisor and the Euclidean Algorithm
Definition 6 (Greatest common divisor).
The greatest common divisor of integers a and b, denoted gcd(a,b), is the largest integer that divides both a and b. When gcd(a,b)=1, we say a and b are coprime.
Theorem 7 (Euclidean algorithm).
For a≥b>0, gcd(a,b)=gcd(b,amodb). When amodb=0, gcd(a,b)=b.
Theorem 8 (B\'{e}zout's identity).
For any integers a and b, there exist integers x and y such that gcd(a,b)=ax+by. These coefficients can be computed by the extended Euclidean algorithm.
Key algorithms:
Euclidean algorithm: computes gcd(a,b) in O(log(min(a,b))) time.
Extended Euclidean algorithm: simultaneously computes gcd(a,b) and the Bézout coefficients x,y in O(log(min(a,b))) time.
Let p be an odd prime. If gcd(a,p)=1 and the congruence x2≡a(modp) has a solution, then a is called a quadratic residue modulo p; otherwise, a is a quadratic nonresidue.
Definition 26 (Legendre symbol).
(pa)=⎩⎨⎧1−10if a is a quadratic residue modulo pif a is a quadratic nonresidue modulo pif p∣a
Theorem 27 (Euler's criterion).
(pa)≡a(p−1)/2(modp)
Theorem 28 (Law of quadratic reciprocity (Gauss)).
For distinct odd primes p and q,
(qp)(pq)=(−1)2p−1⋅2q−1
Theorem 29 (First and second supplements).
(p−1)=(−1)(p−1)/2,(p2)=(−1)(p2−1)/8
Key algorithms:
Tonelli–Shanks algorithm: finds a solution to x2≡a(modp) in O(log2p) time.
A complex-valued function f:Z>0→C defined on the positive integers is called an arithmetic function.
Definition 31 (Multiplicative function).
An arithmetic function f with f(1)=1 is called multiplicative if f(mn)=f(m)f(n) whenever gcd(m,n)=1. It is called completely multiplicative if f(mn)=f(m)f(n) for all positive integers m,n.
Definition 32 (Important arithmetic functions).
Euler's totient functionφ(n): the number of integers k with 1≤k≤n and gcd(k,n)=1.
Divisor functionσk(n)=∑d∣ndk. In particular, σ0(n)=d(n) counts the number of divisors and σ1(n)=σ(n) gives the sum of divisors.
Möbius functionμ(n): equals 1 if n=1; equals (−1)k if n is a product of k distinct primes; equals 0 otherwise (i.e., if n has a squared prime factor).
Theorem 33 (M\"{o}bius inversion formula).
If F(n)=∑d∣nf(d), then f(n)=∑d∣nμ(n/d)F(d).
Definition 34 (Dirichlet convolution).
The Dirichlet convolution of two arithmetic functions f and g is defined by (f∗g)(n)=∑d∣nf(d)g(n/d). The Dirichlet convolution of two multiplicative functions is again multiplicative.
Key algorithms:
Computingφ(n): from the prime factorization, φ(n)=n∏p∣n(1−1/p) in O(n) time.
Sieve-based batch computation: computes φ(k) and μ(k) for all k≤n in O(nloglogn) time.
10. Continued Fractions and Diophantine Approximation
Definition 35 (Continued fraction expansion).
The (regular) continued fraction expansion of a real number α is a representation of the form
α=a0+a1+a2+⋱111=[a0;a1,a2,…]
where a0∈Z and ai∈Z>0 for i≥1. The expansion is finite if and only if α is rational.
Definition 36 (Convergents).
The rational number [a0;a1,…,an]=pn/qn is called the n-th convergent of α. The numerators and denominators satisfy the recurrence
pn=anpn−1+pn−2,qn=anqn−1+qn−2.
Theorem 37 (Best rational approximation).
The convergent pn/qn is the best rational approximation to α among all fractions whose denominator does not exceed qn.
Theorem 38 (Lagrange's theorem).
A real number α is a quadratic irrational if and only if its continued fraction expansion is eventually periodic.
Theorem 39 (Pell's equation).
If D is a positive integer that is not a perfect square, the positive integer solutions of x2−Dy2=1 can be obtained from the convergents of the continued fraction expansion of D.
π(x)=#{p≤x∣p is prime} is called the prime-counting function.
Theorem 41 (Prime number theorem).
π(x)∼lnxx(x→∞)
That is, limx→∞x/lnxπ(x)=1.
Definition 42 (Chebyshev functions).
The Chebyshev functions are defined by θ(x)=∑p≤xlnp and ψ(x)=∑pk≤xlnp.
Theorem 43 (Chebyshev's theorem).
There exist positive constants c1 and c2 such that, for all sufficiently large x,
c1lnxx≤π(x)≤c2lnxx
Theorem 44 (Dirichlet's theorem on primes in arithmetic progressions).
If gcd(a,m)=1, then the arithmetic progression a,a+m,a+2m,… contains infinitely many primes.
Remark 45.
The Riemann hypothesis asserts that all nontrivial zeros of the Riemann zeta function ζ(s)=∑n=1∞n−s lie on the critical line Re(s)=1/2. This remains one of the most important open problems in mathematics, intimately connected to the precise distribution of primes.
For a prime p and a nonzero integer n, the p-adic valuationvp(n) is the largest power of p dividing n. By convention, vp(0)=+∞.
Definition 47 (p-adic absolute value).
The p-adic absolute value is defined by ∣n∣p=p−vp(n) for n=0, and ∣0∣p=0.
Theorem 48 (Properties of the p-adic valuation).
vp(ab)=vp(a)+vp(b).
vp(a+b)≥min(vp(a),vp(b)) (corresponding to the ultrametric inequality).
Equality condition: when vp(a)=vp(b), vp(a+b)=min(vp(a),vp(b)).
Definition 49 (Ring of p-adic integers and the field of p-adic numbers).
The completion of Q with respect to the p-adic absolute value is the field ofp-adic numbersQp. The subring Zp={x∈Qp∣∣x∣p≤1} is the ring ofp-adic integers.
Theorem 50 (Hensel's lemma).
Let f(x)∈Zp[x]. If f(a)≡0(modp) and f′(a)≡0(modp), then there exists α∈Zp with f(α)=0 and α≡a(modp).
Theorem 51 (Connection with the Legendre symbol).
For an odd prime p with gcd(a,p)=1, the congruence x2≡a(modp) has a solution if and only if x2=a has a solution in Qp (by lifting via Hensel's lemma).
An element α∈C is called an algebraic integer if it is a root of a monic polynomial with integer coefficients. The set of all algebraic integers forms a ring.
Definition 53 (Number field and ring of integers).
A finite extension K of Q is called a number field (or algebraic number field). The set of elements of K that are algebraic integers is denoted OK and called the ring of integers of K.
Example 54 (Quadratic fields).
For K=Q(d), where d is a squarefree integer,
OK={Z[d]Z[21+d]if d≡2,3(mod4)if d≡1(mod4)
Definition 55 (Ideal).
An ideala of OK is an additive subgroup satisfying OK⋅a⊆a.
Theorem 56 (Unique factorization of ideals).
Every nonzero ideal of OK factors uniquely (up to order) as a product of prime ideals:
a=p1e1p2e2⋯prer
This is a fundamental property of Dedekind domains.
Definition 57 (Class number).
The class numberhK is the order of the ideal class group Cl(OK) (the group of equivalence classes of fractional ideals). We have hK=1 if and only if OK is a unique factorization domain (UFD).
Theorem 58 (Minkowski's bound).
Every ideal class contains an ideal whose norm does not exceed the Minkowski bound:
MK=nnn!(π4)r2∣ΔK∣
where n=[K:Q], r2 is the number of pairs of complex embeddings, and ΔK is the discriminant.