Section 19.4 Perfect Numbers
ΒΆSubsection 19.4.1 A perfect definition and theorem
ΒΆDefinition 19.4.1.
When the ratio Ο(n)n is exactly 2, we say n is a perfect number.
Theorem 19.4.2.
If n is a number such that 2nβ1 is prime, then the (even) number 2nβ1(2nβ1) is perfect.
Proof.
Euclid's proof (in the link) of this is worth looking at.
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 2nβ1 and a prime of the form 2nβ1.
Proof.
First, assume that \(2^n-1\) is prime. Then the factors of \(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, 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 \(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 is \(2^{n-1}\left(2^n-1\right)\text{.}\) Great!
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βInterestingly, this is the same place as one setting of the Biblical story of the demons called βLegionβ who went into swine. named Nichomachus claimed that the nth 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 such prime is 13, so that the next perfect number,xxxxxxxxxx
(2^13-1)*2^12
Definition 19.4.4.
Recall that if Ο(n)=2n, then n is perfect.
If Ο(n)=kn for some integer k, then we say that n is k-perfect.
Or, if Ο(n)>2n, then n is abundant.
If Ο(n)<2n, we say n is deficient.
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 Ο(n)/n for n is bigger than the value of the ratio for all smaller m<n.
A number is weird if it is abundant but not pseudoperfect. (There is a famous paper of ErdΕs on this topic.)
Question 19.4.6.
Is a perfect number pseudoperfect?
xxxxxxxxxx
sigma(1184),sigma(1210),1184+1210
Algorithm 19.4.7. Get Amicable Numbers.
Here is one way to get amicable numbers.
Make a list of numbers of the form pn=3β 2nβ1 and qn=9β 22nβ1β1.
Then check if pnβ1, pn, and qn are all prime.
If so, then 2npnβ1pn and 2nqn 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).
xxxxxxxxxx
def _(n=[2..20]):
pretty_print(html("We have $p_{%s}=%s$ and $p_{%s}=%s$"%(n,3*2^(n-1)-1,n,3*2^(n)-1)))
pretty_print(html("And $q_{%s}=%s$ as well."%(n,9*2^(2*n-1)-1)))
if is_prime(3*2^n-1) and is_prime(3*2^(n-1)-1) and is_prime(9*2^(2*n-1)-1):
pretty_print(html("Then the pair $%s$ and $%s$ is amicable!"%(2^n*(3*2^(n-1)-1)*(3*2^(n)-1), 2^n*(9*2^(2*n-1)-1))))
else:
pretty_print(html("Doesn't give an amicable pair"))
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.8.
The ratio Ο(n)n may be called the abundancy index of n.
Question 19.4.9.
Rather than asking which integers can be gotten, which rational numbers can be gotten as Ο(n)n?
xxxxxxxxxx
def _(n=(20,[1..200])):
cols = ceil(n/10)
T = [cols*['$n$',r'$\sigma(n)/n$']]
list = [[i,(sigma(i)/i)] for i in range(1,n+1)]
list.extend((10-(len(list)%10))*['',''])
for k in range(10):
t = [item for j in range(cols) for item in list[k+10*j]]
T.append(t)
pretty_print(html(table(T,header_row = True, frame = True)))
Fact 19.4.10.
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.11.
Clearly all such numbers are in the interval [1,β). Here are some more known facts about the abundancy index.
If mβ£n, then Οβ1(n)β₯Οβ1(m).
If Οβ1(n)=ab in lowest terms, then bβ£n.
If r is βcaughtβ between Ο(n) and n (such that n<r<Ο(n)) and is relatively prime to n, 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.