A positive integer is called **perfect** if it is the sum of all its proper divisors. For example, the proper divisors of 6 are 1,2, and 3 and 1 + 2 + 3 = 6.

The $\sigma$-function is defined as $\sigma(n) = \sum_{d\mid n} d$. Therefore, $n$ is perfect if and only if $\sigma(n) = 2n$. If you plot the function $\sigma(n) – 2n$ on the Euclidean plane you get a fascinating picture:

Of course, there are so many data points that it's impossible to see the perfect numbers 6, 28, 496, 8128,… that occur in this graph as well.

All the powers of 2 are nearly perfect: $\sigma(2^n) – 2^{n+1} = -1$. Is it possible for $\sigma(n) – 2n = -1$ when $n$ is not a power of $2$? Can it ever happen that $\sigma(n) – 2n = 1$? It can't happen when $n$ is at most 10^6.

On the other hand $\sigma(n) – 2n$ can be $2$ and it can also be $-2$. Here are some numbers for which this happens:

$n$ | $\sigma(n)-2n$ |

3 | -2 |

10 | -2 |

20 | 2 |

104 | 2 |

136 | -2 |

464 | 2 |

650 | 2 |

1952 | 2 |

32896 | -2 |

130304 | 2 |

522752 | 2 |

Here are some fun facts about perfect numbers:

- All even perfect numbers are of the form $2^{p-1}(2^p – 1)$ for a prime $p$. Though, there are some primes for which this value is composite too. For example, $2^{67} – 1 = 193707721\times 761838257287$ so for $p=67$, the number $2^{p-1}(2^p-1)$ must also be composite.
- Except for the perfect number 6, if you take a perfect number and add up all its decimal digits, repeating this process until you have just one digit left, you get $1$. Let's try it on the perfect number 2658455991569831744654692615953842176. If you add all the digits, you get 190. Do it again to get 10. Then you get 1.
- Makowski proved that 28 is the only perfect number of the form $x^3 + 1$

Perhaps the oddest fact about perfect numbers is that no odd perfect number is known! However, it must be huge indeed. Many mathematicians have worked to find a huge lower bound for an odd perfect number. Brent, Cohen, and te Riele found that an odd perfect number must be greater than $10^{300}$. Curiously, if you look at the table of numbers that were only $\pm 2$ away from being perfect, they are also all even except 3. Crazy right? It's like odd numbers are repelled from being perfect somehow.

In fact it seems that from some quick computer searching, if $n > 10$ is an odd number then $|\sigma(n) – 2n| \geq .6$ For example,

$$\sigma(442365) – 2*442365 = 6.$$ This might even be the largest odd number with $|\sigma(n) – 2n|\leq 6$. Here is a slightly larger odd number that is "close" to being perfect:

$$\sigma(4665735) – 2*4665735 = -270.$$ I wouldn't be surprised if the existence of odd perfect numbers was not settled in my lifetime!