Lecture 15: Perfect Numbers

# Recap and Summary

Last class period we introduced the $\sigma$ function, which takes a given integer n and adds up the divisors of that number. In today's class, we discussed perfect numbers: those numbers n so that $\sigma(n) = 2n$. We gave a characterization of even perfect numbers and talked about properties that odd perfect numbers have — even though we don't know whether odd perfect numbers actually exist. We then briefly mentioned amicable pairs.

# Numeric Perfection

Last class period we saw that $\sigma(6) = 12 = 2\cdot 6$ and $\sigma(28) = 56 = 2\cdot 28$. We said that these numbers n have the additional property that the sum of their proper divisors (i.e., those divisors smaller than n) is n. This leads us to the main topic of the day

Definition: An integer n is called perfect if $\sigma(n) = 2n$. Equivalently, a number n is perfect if the sum of the proper divisors of n is n.

#### Example: Some perfect numbers

In addition to 6 and 28, here are the next perfect numbers: $496, 8128, 33550336$. We noticed in class that these numbers have particular factorizations

(1)
\begin{align} \begin{split} 6 &= 2^1\cdot 3\\ 28 &= 2^2\cdot 7\\ 496 &= 2^4\cdot 31\\ 8128 &= 2^6 \cdot 127\\ 33550336 &= 2^{12}\cdot 8191.\\ \end{split} \end{align}

We noticed a few things about these numbers in class. First, these numbers all seemed to factor as some power of two times some other odd prime. This odd prime number also seemed to be one less than a power of 2, and indeed the power of 2 which appeared in the factorization of n seemed to determine the power of 2 which was just ahead of the odd prime. In summary, we said that it seemed that the perfect numbers we were seeing took the form

(2)
$$2^{p-1}(2^p-1),$$

where $2^p-1$ was prime (and hence p itself was prime; see Exercise 26 in Chapter 1 of Strayer). It turns out we're not the first people to recognize this.$\square$

Theorem: If $n = 2^{p-1}(2^p-1)$ where $2^p-1$ is prime, then n is perfect.

Proof: To see that this is true, we just compute $\sigma(n)$:

(3)
\begin{align} \sigma(n) = \sigma(2^{p-1}(2^p-1)=\sigma(2^{p-1})\sigma(2^p-1), \end{align}

where the last equality follows because $(2^{p-1},2^p-1) = 1$. Now we can compute the value of $\sigma$ on each of the components individually; for the former we can use our formula for $\sigma$ on a prime power, and for the latter we can use the fact that $2^p-1$ is prime to conclude that $\sigma(2^p-1) = 2^p-1+1$:

(4)
\begin{align} \sigma(2^{p-1})\sigma(2^p-1) = \frac{2^p-1}{2-1} (2^p-1+1) = 2^p(2^p-1). \end{align}

Notice that this final expression is just $2\cdot (2^{p-1}(2^p-1)) = 2n$, and hence we've proven that n is perfect.$\square$

Hence this theorem says whenever we find a prime of the form $2^p-1$, we can use this to produce a new even perfect number. Since it was recently shown that $2^{43112609}-1$ is a prime number, this means that

(5)
$$2^{43112608}(2^{43112609}-1)$$

is a perfect number. This number has around 26 million digits!

# Is This It?

Now that we've shown that numbers of a particular form are perfect, it is natural to ask if there are numbers not of this form which are perfect. A partial answer to this question was provided by Euler.

Theorem: If n is even and perfect, then $n = 2^{p-1}(2^p-1)$, where $2^p-1$ is prime.

Notice in particular this means that we have a correspondence between even perfect numbers and Mersenne primes: finding one gives rise to another.

Proof: Suppose that n is an even perfect number, and factor n as $n=2^a b$; we assume that this factorization leaves $2\nmid b$. Our goal will be to show that $b = 2^{a+1}-1$, and that b is prime.

Now let's compute $\sigma(n)$ in two ways. First, we'll use the factorization of n to determine a factorization of $\sigma(n)$:

(6)
\begin{align} \sigma(n) = \sigma(2^a b) = \sigma(2^a)\sigma(b) = (2^{a+1}-1)\sigma(b). \end{align}

On the other hand, we know that n is perfect, so that $\sigma(n) = 2n$. Hence we have

(7)
\begin{align} \sigma(n) = 2n = 2(2^ab) = 2^{a+1}b. \end{align}

Putting these two equations together leaves

(8)
\begin{align} 2^{a+1}b = (2^{a+1}-1)\sigma(b). \end{align}

Our goal will be to use this equation to tell us that b has the desired form.

To do this, notice that $2^{a+1}$ divides the left hand side, so hence we also have $2^{a+1} \mid (2^{a+1}-1)\sigma(b)$. Since $2^{a+1}-1$ is relatively prime to $2^{a+1}$, this means that we must have $2^{a+1} \mid \sigma(b)$. This means there is an integer c so that

(9)
\begin{align} 2^{a+1}c = \sigma(b). \end{align}

Notice that if we substitute this expression back in for $\sigma(b)$ in Equation (8) and cancel out the $2^{a+1}$ term common to both sides, then we get the equation

(10)
$$b = (2^{a+1}-1)c.$$

We now claim that — in fact — $c=1$. To do this, suppose that $c>1$. Then Equation (10) tells us that c is a divisor of b which is distinct from 1 and b, and hence we get

(11)
\begin{align} \sigma(b) = \sum_{d\mid b} d \geq 1+c+b. \end{align}

On the other hand, we know from Equation (9) that

(12)
\begin{align} \sigma(b) = 2^{a+1}c = 2^{a+1}c-c+c = (2^{a+1}-1)c+c = b + c, \end{align}

where the last equality comes from Equation (10). Together these equations give an obvious contradiction, and hence we conclude that $c=1$.

Now that we know $c=1$, we can substitute this back into Equations (9) and (10) to find

(13)
\begin{align} \begin{split} b &= 2^{a+1}-1\\ \sigma(b) &= 2^{a+1}. \end{split} \end{align}

Hence we have $\sigma(b) = b+1$, so that we know b is prime.

Believe it or not, we've now established everything we set out to prove. $\square$

# Odd Perfects

Since we have such a nice description of even perfect numbers, it's natural to wonder if we've captured all the perfect numbers out there. In other words, we'd like to know if there are odd perfect numbers. It turns out that no one yet knows whether odd perfect numbers exist. There's been a lot of work done to find these numbers, and a surprising amount about odd perfect numbers is known. That is to say, if an odd perfect number exists, it has to satisfy a number of properties that one might not expect a priori. For instance, we proved the following

Theorem: If n is an odd perfect number, then $n = p^a m^2$ where p is an odd prime that is congruent to 1 modulo 4, a is an integer which is congruent to 1 modulo 4, and m is an integer relatively prime to p.

Proof: Since n is odd we know that $n \equiv 1,3 \mod{4}$. Either way, we have $2n \equiv 2 \mod{4}$, and hence we know that

(14)
\begin{align} \sigma(n) = 2n \equiv 2 \mod{4}. \end{align}

Now if $n = p_1^{a_1} \cdots p_k^{a_k}$ then we know

(15)
\begin{align} \sigma(n) = \sigma(p_1^{a_1})\cdots \sigma(p_k^{a_k}). \end{align}

We argued that none of these factors $\sigma(p_i^{a_i})$ could be congruent to 0 modulo 4, since this would in turn imply that $\sigma(n) \equiv 0 \mod{4}$. We also said that there can't be more than one term could satisfy $\sigma(p_i^{a_i}) \equiv 2 \mod{4}$, since this would also force $\sigma(n) \equiv 0 \mod{4}$. Finally, we said that there has to be at least one term which does satisfy $\sigma(p_i^{a_i}) \equiv 2 \mod{4}$, since otherwise we'd be taking a product of terms which are all congruent to 1 or 3 modulo 4 (and hence their product couldn't be congruent to 2 modulo 4). Hence there is a unique prime p which has $n = p^a s$ with $\sigma(p^a) \equiv 2 \mod{4}$ and $(p^a,s)=1$.

We need to argue that $p \equiv a \equiv 1 \mod{4}$. First, suppose that $p \equiv 3 \mod{4}$. Then we get

(16)
\begin{align} \sigma(p^a) = 1+p+p^2+p^3+\cdots+p^a \equiv 1 + 3 + 1 + 3 + \cdots = \left\{\begin{array}{ll}1 &,\mbox{ if there are an odd number of summands}\\0 &,\mbox{ if there are an even number of summands}.\end{array}\right. \end{align}

Now regardless of what a is, a sum of this form is either 1 or 0 modulo 4 (depending on whether there are an odd or an even number of terms in the sum). Either way, though, the sum is never 2 mod 4, which is what it should be. hence $p \not\equiv 3 \mod{4}$, and so we have $p \equiv 1 \mod{4}$. Now that we know $p \equiv 1 \mod{4}$, then let's look at $\sigma(p^a)$ again:

(17)
\begin{align} \sigma(p^a) = 1+p+p^2+p^3+\cdots+p^a \equiv 1 + 1 + 1 + 1 + \cdots \equiv a+1 \mod{4}. \end{align}

Hence we have $a+1\equiv 2 \mod{4}$, and so we conclude $a \equiv 1$ mod 4.

Finally, we argue that when we write $n = p^as$, then $s = m^2$. For this, notice that $\sigma(s)$ must be an odd number — if it were even, then we'd have $\sigma(n) \equiv 0 \mod{4}$, which we've already proven is false. But the only way for $\sigma(s)$ to be odd is if s is a perfect square. Hence $s = m^2$, and so n takes the desired form. $\square$

As an exercise, see if you can see which detail I've brushed over in this proof. (Hint: It's near the end.)

# Amicable Numbers

To conclude this section, I gave the following

Definition: Two integers n,m form an amicable pair if

\sigma(n) = \sigma(m) = m+n.

Notice that if n and m form an amicable pair, then

• the sum of the proper divisors of n is equal to m and
• the sum of the proper divisors of m is equal to n.

You'll get a chance in the homework to play with an amicable pair.