Table of contents
Featured; Perfect numbers
2 min read
Introduction
I recently came across perfect numbers in a coding challenge and the topic fascinated me. So I thought to dedicate a blog to these perfect numbers.
A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. For instance, 6 has divisors 1, 2 and 3 (excluding itself), and 1 + 2 + 3 = 6, so 6 is a perfect number.
The Euclid–Euler theorem is a theorem in number theory that relates perfect numbers to Mersenne primes. It states that an even number is perfect if and only if it has the form , where is a prime number. The theorem is named after mathematicians Euclid and Leonhard Euler, who respectively proved the “if” and “only if” aspects of the theorem.
Sufficiency proof
- is prime
- The divisors of are 1, 2, 4, 8, …, form a geometric series that sum to .
- Since is prime, it has 2 divisors: , . The sum of the divisors is
- Therefore, is perfect.
Necessity Proof
- Suppose an even perfect number is given, and partially factor it as (1)
- The odd factor on the right, is at least 3 and must divide , the only odd factor on the left side -> is a proper divisor of
- Dividing both sides of (1) by common factor and taking into account known divisors , of -> Therefore, there cannot be other divisors, , and must be prime of the form .