Section 19.4 Perfect Numbers
Subsection 19.4.1 A perfect definition and theorem
Definition 19.4.1.
When the ratio \(\frac{\sigma(n)}{n}\) is exactly \(2\text{,}\) we say \(n\) is a perfect number.
This is a big definition, and it goes back at least to Euclid. Euclid defines the notion at the beginning of the number-theoretic books of the Elements, and only mentions it again over one hundred propositions later, where he proves that certain numbers are, in fact, perfect. (A careful reader will notice that the primes in question are, in fact, the Mersenne primes of Definition 12.1.6!) Such a conclusion is a fitting end, as William Dunham says in his book, Journey through Genius [E.5.5].
Theorem 19.4.2.
If \(n\) is a number such that \(2^n-1\) is prime, then the (even) number \(2^{n-1}\left(2^n-1\right)\) is perfect.
Proof.
Euclid's proof (in the link) of this is worth looking at.
Many centuries later, Euler proved the converse; we will prove them together. (See also Chapter 1 of Dunham's Euler: The Master of Us All [E.5.6].)
Theorem 19.4.3. Characterization of Even Perfect Numbers.
If \(N\) is an even number, it is perfect if and only if it is the product of a power \(2^{n-1}\) and a prime of the form \(2^n-1\) (for the same \(n\)).
Proof.
First, assume that \(2^n-1\) is prime. Then the factors of \(N = 2^{n-1}\left(2^n-1\right)\) are coprime, so
The steps are because of multiplicativity and the formulas we had earlier (see Theorem 19.2.5) for \(\sigma\) of powers of two and primes. But then
so that the sum of divisors is exactly twice the original number.
Now for the converse, which is somewhat longer. Let us start with an even perfect number \(N\text{,}\) which is perforce divisible by some power of two.
Looking ahead, call this power the \((n-1)\)th power! Then our even perfect number may be written as \(N = 2^{n-1}q\text{,}\) where \(q\) is the (odd) quotient.
Let's divide the rest of the proof into several pieces. First, two facts.
-
We know that this number is perfect, so
\begin{equation*} \sigma\left(2^{n-1}q\right)=2\cdot 2^{n-1}q=2^nq \end{equation*} -
We also know how to compute \(\sigma\text{,}\) so
\begin{equation*} \sigma\left(2^{n-1}q\right)=\sigma\left(2^{n-1}\right)\sigma(q)=\left(2^n-1\right)\sigma(q) \end{equation*}
We can combine these observations to see that
Note that this means \(2^n-1\mid q\text{,}\) since \(q\) is the only odd part of the left-hand side (implicitly using some of Theorem 6.3.2). Let's write
Substituting, we have
Since \(m\) and \(q\) both divide \(q\text{,}\) by the definition of \(\sigma\) we have
Since these two divisors (\(q\) and \(m\)) alone add up to \(\sigma(q)\text{,}\) it must be true that \(q\) has exactly these two divisors, so it is prime. That means \(m=1\text{,}\) and \(q=2^n-1\text{,}\) and so the perfect number \(N\) equals \(2^{n-1}\left(2^n-1\right)\text{.}\) Great!
We will leave the question about whether there are odd perfect numbers to Section 19.5.
Subsection 19.4.2 Speculation and more terminology
There are many things people have claimed about numbers of this type. A Hellenistic Roman in the first century in Gerasa 1 named Nichomachus claimed that the \(n\)th perfect number had \(n\) decimal digits.
Nicomachus was more concerned with mystical claims about perfect numbers (which many repeated), but this mathematical assertion continued to be made for over a thousand years. However, knowing what we do about Mersenne primes (recall Definition 12.1.6), we see that the fifth possible \(n\) is \(13\text{,}\) so that the next perfect number,
was very large and so lay mysterious for a long time. It was apparently discovered in the fifteenth century.
Until the early modern period, such numbers were basically inaccessible.
Number theorists (often of the amateur variety, but certainly not always) have come up with all kinds of other names for various concepts related to \(\sigma(n)/n\text{.}\)
Definition 19.4.4.
Recall that if \(\sigma(n)=2n\text{,}\) then \(n\) is perfect.
If \(\sigma(n)=kn\) for some integer \(k\text{,}\) then we say that \(n\) is \(k\)-perfect.
Or, if \(\sigma(n)>2n\text{,}\) then \(n\) is abundant.
If \(\sigma(n)<2n\text{,}\) we say \(n\) is deficient.
As it will turn out, these things are not really good characterizations of what it means to have “too many” or “too few” divisors, but in recognition of the Greeks' contributions we keep this allusive and fairly standard terminology. As examples, Exercise 19.6.7 asks for a 3-perfect number, if one exists, and Exercise 19.6.17 asks for a 4-perfect number.
Definition 19.4.5.
Here are some less well-known, but nonetheless interesting, terms.
A number is pseudoperfect if it is the sum of some of its divisors (other than itself).
A number \(n\) is superabundant if the ratio \(\sigma(n)/n\) for \(n\) is bigger than the value of the ratio for all smaller \(m\lt n\text{.}\)
A number is weird if it is abundant but not pseudoperfect. (There is a famous paper of Erdős on this topic.)
There are many questions one can ask about these and other definitions; see Exercise Group 19.6.15–21. One cheeky such question is this.
Question 19.4.6.
Is a perfect number pseudoperfect?
One other interesting idea is that of amicable numbers, which are pairs \(m,n\) of numbers such that \(\sigma(n)=\sigma(m)=m+n\text{.}\) Clearly any perfect number is amicable with itself. The smallest pair of unequal amicable numbers is \((220,284)\text{;}\) this was known to the ancient Greeks, cherished by some medieval Muslims, and apparently was not improved upon until the modern number-theoretic era. See if you can find this one in the following image 2 from an appendix of sorts to the Harmonie Universelle, Mersenne's monumental compendium of practical and theoretical music.
![](../images/Amicable.jpg)
Fermat, Descartes, and Euler all worked with this question and found large examples; presumably Mersenne's \(18416\) and \(17296\) in the figure was due to Fermat (see below). But it turns out that the next smallest pair was found by a sixteen-year old Italian boy in 1860!
Apparently he came up with this by trial and error, though no one knows for sure. The internet can provide some of the most current data on these pairs.
There is a way to get as many amicable pairs as you like, discovered by Ibn Qurra and (later) Fermat (see [E.5.8, II.IV]), and finally used by Euler.
Algorithm 19.4.8. Get Amicable Numbers.
Here is one way to get amicable numbers.
Make a list of numbers of the form \(p_n=3\cdot 2^n-1\) and \(q_n=9\cdot 2^{2n-1}-1\text{.}\)
Then check if \(p_{n-1}\text{,}\) \(p_n\text{,}\) and \(q_n\) are all prime.
If so, then \(2^np_{n-1}p_n\) and \(2^nq_n\) are an amicable pair.
Proof.
Since only primes and powers of two are involved, it's easy to calculate \(\sigma\) in this case, so proving it is left as an exercise (see Exercise 19.6.21).
Subsection 19.4.3 The abundancy index
It's time to give a name to the mysterious ratio at the core of this section.
Definition 19.4.9.
The ratio \(\frac{\sigma(n)}{n}\) may be called the abundancy index of \(n\text{.}\)
A beautiful thing is that once you name a concept, you can ask questions about it. Here's another largely open question which seems like it should be easy…
Question 19.4.10.
Rather than asking which integers can be gotten, which rational numbers can be gotten as \(\frac{\sigma(n)}{n}\text{?}\)
There are some interesting theorems about this already known. For one thing, the abundancy index is the same thing as \(\sigma_{-1}(n)\text{.}\)
Fact 19.4.11.
Proof.
We have that
Now note that for every \(d\mid n\text{,}\) the quotient is also an integer divisor \(d'\) of \(n\text{.}\) So
This is the same list as the original divisor list, so reordering gives
Fact 19.4.12.
Clearly all such numbers are in the interval \(\left[1,\infty\right)\text{.}\) Here are some more known facts about the abundancy index.
If \(m\mid n\text{,}\) then \(\sigma_{-1}(n)\geq \sigma_{-1}(m)\text{.}\)
If \(\sigma_{-1}(n)=\frac{a}{b}\) in lowest terms, then \(b\mid n\text{.}\)
If \(r\) is “caught” between \(\sigma(n)\) and \(n\) (such that \(n<r<\sigma(n)\)) and is relatively prime to \(n\text{,}\) then \(r/n\) is not an abundancy index.
Proof.
We skip the proof, but proving the first two facts is left as Exercise 19.6.22.
Holdener and Stanton picturesquely call rational numbers which are not abundancies abundancy outlaws. The end of this hyper-linked paper [E.7.11] has a nice list of which numbers thus far have been found, and which have not.