Perfect Numbers #
This file proves Theorem 70 from the 100 Theorems List.
The theorem characterizes even perfect numbers.
Euclid proved that if 2 ^ (k + 1) - 1
is prime (these primes are known as Mersenne primes),
then 2 ^ k * (2 ^ (k + 1) - 1)
is perfect.
Euler proved the converse, that if n
is even and perfect, then there exists k
such that
n = 2 ^ k * (2 ^ (k + 1) - 1)
and 2 ^ (k + 1) - 1
is prime.
References #
https://en.wikipedia.org/wiki/Euclid%E2%80%93Euler_theorem
theorem
Theorems100.Nat.sigma_two_pow_eq_mersenne_succ
(k : ℕ)
:
(ArithmeticFunction.sigma 1) (2 ^ k) = mersenne (k + 1)
theorem
Theorems100.Nat.eq_two_pow_mul_prime_mersenne_of_even_perfect
{n : ℕ}
(ev : Even n)
(perf : n.Perfect)
:
Perfect Number Theorem: Euler's theorem that even perfect numbers can be factored as a power of two times a Mersenne prime.