A perfect number is a positive integer the sum of whose proper divisorsA proper divisor is a number n that when divided into another number N leaves no remainder. is equal to the number itself. The smallest perfect number is 6, which has proper divisors of 1, 2, and 3.[a] The next three perfect numbers, in ascending order, are 28, 496, and 8128, all of which were known to ancient mathematicians. All known perfect numbers are even; it is uncertain whether there are any odd perfect numbers.

Followers of the Ancient Greek philosopher Pythagoras had a particular interest in the mystical properties of numbers. Pythagoras is credited with coining the term perfect to describe the numbers 6 and 28, because they correspond to heavenly events: the number of days it took God to create the world and the number of days it takes the Moon to complete an orbit of the Earth, the lunar cycle.[b] In the words of St Augustine, writing in De civitate Dei contra paganos (The City of God) in the early 5th century:

Six is a number perfect in itself, and not because God created all things in six days; rather, the converse is true. God created all things in six days because the number is perfect.