Fermat's little theorem states that if a number p is prime, then for any integer a, the number a^p - a is an integer multiple of p. It is used as the basis for the Fermat primality test and is one of the fundamental results of elementary number theory. It was first stated by Pierre de Fermat in 1640 and is sometimes referred to as the "little theorem" to distinguish it from Fermat's Last Theorem.

CS 70 presents key ideas from discrete mathematics and probability theory with emphasis on their application in Electrical Engineering and Computer Sciences. It addresses a variety of topics such as logic, induction, modular arithmetic, and probability. Sophomore mathematical maturity and programming experience equivalent to an Advanced Placement Computer Science A exam are prerequisites.