Part One. Foundations of Number Theory: The greatest common divisor of two numbers Prime numbers and factorization into prime factors The greatest common divisor of several numbers Number-theoretic functions Congruences Quadratic residues Pell's equation Part Two. Brun's Theorem and Dirichlet's Theorem: Introduction Some elementary inequalities of prime number theory Brun's theorem on prime pairs Dirichlet's theorem on the prime numbers in an arithmetic progression; Further theorems on congruences; Characters; $L$-series; Dirichlet's proof Part Three. Decomposition into Two, Three, and Four Squares: Introduction Farey fractions Decomposition into two squares Decomposition into four squares; Introduction; Lagrange's theorem; Determination of the number of solutions Decomposition into three squares; Equivalence of quadratic forms; A necessary condition for decomposability into three squares; The necessary condition is sufficient Part Four. The Class Number of Binary Quadratic Forms: Introduction Factorable and unfactorable forms Classes of forms The finiteness of the class number Primary representations by forms The representation of $h(d)$ in terms of $K(d)$ Gaussian sums; Appendix; Introduction; Kronecker's proof; Schur's proof; Mertens' proof Reduction to fundamental discriminants The determination of $K(d)$ for fundamental discriminants Final formulas for the class number Appendix. Exercises: Exercises for part one Exercises for part two Exercises for part three Index of conventions; Index of definitions Index.