5.4: Fermet and Mersenne Primes
( \newcommand{\kernel}{\mathrm{null}\,}\)
Through the ages, back to early antiquity, people have been fascinated by numbers, such as 6, that are the sum of their divisors other than itself, to wit: 6=1+2+3. Mersenne and Fermat primes, primes of the form 2k±1, have attracted centuries of attention. Note that if p is a prime other than 2, then pk±1 is divisible by 2 and therefore not a prime.
Definition 5.11
- The Mersenne primes are Mk=2k−1. A Mersenne prime is a Mersenne number that is also prime.
- The Fermat primes are Fk=22k−1. A Fermat prime is a Fermat number that is also prime. The number n∈N is called perfect, if σ(n)=2n
Lemma 5.12
- If ad=k, then 2d−1|2k−1.
- If ad=k and a is odd, then 2d+1|2k+1.
- Proof
-
We only prove (2). The other statement can be proved similarly. So suppose that a is odd, then
2d=2d+1−1⇒2ad=2d+1(−1)a=2d+1−1⇒2ad+1=2d+10
which proves the statement. Notice that this includes the case where d=1. In that case, we have 3|2a+1 (whenever a odd).
A proof using the geometic series can be found in exercise 1.14. This lemma immediately implies the following.
Corollary 5.13
If 2k−1 is prime, then k is prime.
If 2k+1 is prime, then k=2r.
So, candidates of Mersenne primes are the numbers 2p−1 where p is prime. This works for p∈{0,1,⋯,10}, but 211−1 is the monkey-wrench.
It is equal to 23⋅89 and thus is composite. After that, the Mersenne primes become increasingly sparse. Among the first approximately 2.3 million primes, only 45 give Mersenne primes. As of this writing (2017), it is not known whether there are infinitely many Mersenne primes. In 2016, a very large Mersenne prime was discovered: 274,207,281−1. Mersenne primes are used in pseudo-random number generators.
Turing to primes of the form 2k+1, the only candidates are Fr=22r+1. Fermat himself noted that Fr is prime for 0≤r≤4, and he conjectured that all these numbers were primes. Again, Fermat did not quite get it right! It turns out that the 5-th Fermat number, 232+1, is divisible by 641 (see exercise 5.11). In fact, as of this writing in 2017, there are no other known Fermat primes among the first 297 297 fermat numbers! Fermat primes are also used in pseudorandom number generators.
Lemma 5.14
If 2k−1 is prime, then k>1 and 2k−1(2k−1) is perfect.
- Proof
-
If 2k−1 is prime, then it must be at least 2, and so k>1. Let n=2k−1(2k−1). Since σ is multiplicative and 2k−1 is prime, we can compute (using Theorem 4.5):
σ(n)=σ(2k−1)σ(2k−1)=(k−1∑i=02i)2k=(2k−1)2k=2n
which proves the lemma.
Theorem 5.15 (Euler's Theorem)
Suppose n is even. Then n is perfect if and only if n is of the form 2k−1(2k−1) where 2k−1 is prime.
- Proof
-
One direction follows from the previous lemma. We only need to prove that if an even number n=q2k−1 where k≥2, is perfectm then it is of the form stipulated.
Since n is even, we may assume n=q2k−1 where k≥2 and 2∤q. Using multiplicativity of σ and the fact that σ(n)=2n:
σ(n)=σ(q)(2k−1)=q2k
Thus
(2k−1)σ(q)−2kq=0
Since 2k−(2k−1)=1, we know by Bezout that gcd. Thus Propostion 3.5 implies that the general solution of the above equation is:
\begin{array} {ccc} {q=(2^{k}-1)t}&{\mbox{and}}&{\sigma (q) = 2^{k} t} \end{array} \nonumber
where t>0, because we know that q>0
Assume first that t>1. The form of q, namely q = (2^{k}-1)t, allow us to identify at least four distinct divisors of q. This gives that
\sigma (q) \ge 1+t+(2^{k}-1)+(2^{k}-1)t = 2^{k}(t+1) \nonumber
This contradicts equation 5.2, and so t=1.
Now use equation 5.2 again (with t = 1) to get that n = _{q}2^{k-1} = (2^{k}-1) 2^{k-1} has the required form. Futhermore, the same equation says that \sigma (q) = \sigma (2^{k}-1) = 2^k which proves that 2^{k}-1 is prime.
It is unknown at the date of this writing whether any odd perfect numbers exist.