This document discusses Fermat's theorem and Euler's theorem, which are related theorems about integers modulo prime numbers. It provides proofs of both theorems and explains their applications. It also defines Euler's totient function φ(n) and provides examples to demonstrate how it can be used to calculate φ(n) for composite numbers.