Introduction -- Divisibility and primes -- Congruences -- The law of quadratic reciprocity -- Arithmetic functions -- A few Diophantine equations -- The Gaussian integers -- Arithmetic in quadratic fields -- Factorization theory in quadratic fields -- Applications of the factorization theory to Diophantine equations -- The representation of integers by binary quadratic forms.