# Which number is a perfect number?

It is not known when perfect numbers were first studied and indeed the first studies may go back to the earliest times when numbers first aroused curiosity. It is quite likely, alt

It is not known when perfect numbers were first studied and indeed the first studies may go back to the earliest times when numbers first aroused curiosity. It is quite likely, although not certain, that the Egyptians would have come across such numbers naturally given the way their methods of calculation worked, see for example [17] where detailed justification for this idea is given. Perfect numbers were studied by Pythagoras and his followers, more for their mystical properties than for their number theoretic properties. Before we begin to look at the history of the study of perfect numbers, we define the concepts which are involved.

Today the usual definition of a perfect number is in terms of its divisors, but early definitions were in terms of the 'aliquot parts' of a number.

An aliquot part of a number is a proper quotient of the number. So for example the aliquot parts of 10 are 1, 2 and 5. These occur since 1=1010,2=1051 = \large\frac{10}{10}\normalsize , 2 = \large\frac{10}{5}\normalsize1=1010,2=510, and 5=1025 = \large\frac{10}{2}\normalsize5=210. Note that 10 is not an aliquot part of 10 since it is not a proper quotient, i.e. a quotient different from the number itself. A perfect number is defined to be one which is equal to the sum of its aliquot parts.

The four perfect numbers 6, 28, 496 and 8128 seem to have been known from ancient times and there is no record of these discoveries.

6 = 1 + 2 + 3,

28 = 1 + 2 + 4 + 7 + 14,

496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248

8128 = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 127 + 254 + 508 + 1016 + 2032 + 4064The first recorded mathematical result concerning perfect numbers which is known occurs in Euclid's Elements written around 300BC. It may come as a surprise to many people to learn that there are number theory results in Euclid's Elements since it is thought of as a geometry book. However, although numbers are represented by line segments and so have a geometrical appearance, there are significant number theory results in the Elements. The result which is if interest to us here is Proposition 36 of Book IX of the Elements which states [2]:-

If as many numbers as we please beginning from a unit be set out continuously in double proportion, until the sum of all becomes a prime, and if the sum multiplied into the last make some number, the product will be perfect.Here 'double proportion' means that each number of the sequence is twice the preceding number. To illustrate this Proposition consider 1 + 2 + 4 = 7 which is prime. Then(the sum) × (the last) = 7 × 4 = 28,which is a perfect number. As a second example, 1 + 2 + 4 + 8 + 16 = 31 which is prime. Then 31 × 16 = 496 which is a perfect number.

Now Euclid gives a rigorous proof of the Proposition and we have the first significant result on perfect numbers. We can restate the Proposition in a slightly more modern form by using the fact, known to the Pythagoreans, that

1+2+4+...+2k1=2k11 + 2 + 4 + ... + 2^{k-1} = 2^{k} - 11+2+4+...+2k1=2k1.The Proposition now reads:-

If, for some k>1,2k1k > 1, 2^{k} - 1k>1,2k1 is prime then 2k1(2k1)2^{k-1}(2^{k} - 1)2k1(2k1) is a perfect number.The next significant study of perfect numbers was made by Nicomachus of Gerasa. Around 100 AD Nicomachus wrote his famous text Introductio Arithmetica which gives a classification of numbers based on the concept of perfect numbers. Nicomachus divides numbers into three classes: the superabundant numbers which have the property that the sum of their aliquot parts is greater than the number; deficient numbers which have the property that the sum of their aliquot parts is less than the number; and perfect numbers which have the property that the sum of their aliquot parts is equal to the number (see [8], or [1] for a different translation):-

Among simple even numbers, some are superabundant, others are deficient: these two classes are as two extremes opposed to one another; as for those that occupy the middle position between the two, they are said to be perfect. And those which are said to be opposite to each other, the superabundant and the deficient, are divided in their condition, which is inequality, into the too much and the too little.However Nicomachus has more than number theory in mind for he goes on to show that he is thinking in moral terms in a way that might seem extraordinary to mathematicians today (see [8], or [1] for a different translation):-

In the case of the too much, is produced excess, superfluity, exaggerations and abuse; in the case of too little, is produced wanting, defaults, privations and insufficiencies. And in the case of those that are found between the too much and the too little, that is in equality, is produced virtue, just measure, propriety, beauty and things of that sort - of which the most exemplary form is that type of number which is called perfect.Now satisfied with the moral considerations of numbers, Nicomachus goes on to provide biological analogies in which he describes superabundant numbers as being like an animal with (see [8], or [1]):-

... ten mouths, or nine lips, and provided with three lines of teeth; or with a hundred arms, or having too many fingers on one of its hands....Deficient numbers are compared to animals with:-

a single eye, ... one armed or one of his hands has less than five fingers, or if he does not have a tongue...Nicomachus goes on to describe certain results concerning perfect numbers. All of these are given without any attempt at a proof. Let us state them in modern notation.(1) The nnnth perfect number has nnn digits.

(2) All perfect numbers are even.

(3) All perfect numbers end in 6 and 8 alternately.

(4) Euclid's algorithm to generate perfect numbers will give all perfect numbers i.e. every perfect number is of the form 2k1(2k1)2^{k-1}(2^{k} - 1)2k1(2k1), for some k>1k > 1k>1, where 2k12^{k} - 12k1 is prime.

(5) There are infinitely many perfect numbers.We will see how these assertions have stood the test of time as we carry on with our discussions, but let us say at this point that assertions (1) and (3) are false while, as stated, (2), (4) and (5) are still open questions. However, since the time of Nicomachus we do know a lot more about his five assertions than the simplistic statement we have just made. Let us look in more detail at Nicomachus's description of the algorithm to generate perfect numbers which is assertion (4) above (see [8], or [1]):-

There exists an elegant and sure method of generating these numbers, which does not leave out any perfect numbers and which does not include any that are not; and which is done in the following way. First set out in order the powers of two in a line, starting from unity, and proceeding as far as you wish: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096; and then they must be totalled each time there is a new term, and at each totalling examine the result, if you find that it is prime and non-composite, you must multiply it by the quantity of the last term that you added to the line, and the product will always be perfect. If, otherwise, it is composite and not prime, do not multiply it, but add on the next term, and again examine the result, and if it is composite leave it aside, without multiplying it, and add on the next term. If, on the other hand, it is prime, and non-composite, you must multiply it by the last term taken for its composition, and the number that results will be perfect, and so on as far as infinity.As we have seen this algorithm is precisely that given by Euclid in the Elements. However, it is probable that this methods of generating perfect numbers was part of the general mathematical tradition handed down from before Euclid's time and continuing till Nicomachus wrote his treatise. Whether the five assertions of Nicomachus were based on any more than this algorithm and the fact the there were four perfect numbers known to him 6, 28, 496 and 8128, it is impossible to say, but it does seem unlikely that anything more lies behind the unproved assertions. Some of the assertions are made in this quote about perfect numbers which follows the description of the algorithm [1]:-

When these have been discovered, 6 among the units and 28 in the tens, you must do the same to fashion the next. ... the result is 496, in the hundreds; and then comes 8128 in the thousands, and so on, as far as it is convenient for one to follow.Despite the fact that Nicomachus offered no justification of his assertions, they were taken as fact for many years. Of course there was the religious significance that we have not mentioned yet, namely that 6 is the number of days taken by God to create the world, and it was believed that the number was chosen by him because it was perfect. Again God chose the next perfect number 28 for the number of days it takes the Moon to travel round the Earth. Saint Augustine (354-430) writes in his famous text The City of God :-

Six is a number perfect in itself, and not because God created all things in six days; rather, the converse is true. God created all things in six days because the number is perfect ...The Arab mathematicians were also fascinated by perfect numbers and Thabit ibn Qurra wrote the Treatise on amicable numbers in which he examined when numbers of the form 2np2^{n}p2np, where ppp is prime, can be perfect. Ibn al-Haytham proved a partial converse to Euclid's proposition in the unpublished work Treatise on analysis and synthesis when he showed that perfect numbers satisfying certain conditions had to be of the form 2k1(2k1)2^{k-1}(2^{k} - 1)2k1(2k1) where 2k12^{k} - 12k1 is prime.

Among the many Arab mathematicians to take up the Greek investigation of perfect numbers with great enthusiasm was Ismail ibn Ibrahim ibn Fallus (1194-1239) who wrote a treatise based on the Introduction to arithmetic by Nicomachus. He accepted Nicomachus's classification of numbers but the work is purely mathematical, not containing the moral comments of Nicomachus. Ibn Fallus gave, in his treatise, a table of ten numbers which were claimed to be perfect, the first seven are correct and are in fact the first seven perfect numbers, the remaining three numbers are incorrect. For more details of this impressive work see [6] and [7].

At the beginning of the renaissance of mathematics in Europe around 1500 the assertions of Nicomachus were taken as truths, nothing further being known concerning perfect numbers not even the work of the Arabs. Some even believed the further unjustified and incorrect result that 2k1(2k1)2^{k-1}(2^{k} - 1)2k1(2k1) is a perfect number for every odd kkk. Pacioli certainly seems to have believed in this fallacy. Charles de Bovelles, a theologian and philosopher, published a book on perfect numbers in 1509. In it he claimed that Euclid's formula 2k1(2k1)2^{k-1}(2^{k} - 1)2k1(2k1) gives a perfect number for all odd integers kkk, see [10]. Yet, rather remarkably, although unknown until comparatively recently, progress had been made.

The fifth perfect number has been discovered again (after the unknown results of the Arabs) and written down in a manuscript dated 1461. It is also in a manuscript which was written by Regiomontanus during his stay at the University of Vienna, which he left in 1461, see [14]. It has also been found in a manuscript written around 1458, while both the fifth and sixth perfect numbers have been found in another manuscript written by the same author probably shortly after 1460. All that is known of this author is that he lived in Florence and was a student of Domenico d'Agostino Vaiaio.

In 1536, Hudalrichus Regius made the first breakthrough which was to become common knowledge to later mathematicians, when he published Utriusque Arithmetices in which he gave the factorisation 2111=2047=23.892^{11} - 1 = 2047 = 23 . 892111=2047=23.89. With this he had found the first prime p such that 2p1(2p1)2^{p-1}(2^{p} - 1)2p1(2p1) is not a perfect number. He also showed that 2131=81912^{13} - 1 = 81912131=8191 is prime so he had discovered (and made his discovery known) the fifth perfect number 212(2131)=335503362^{12}(2^{13} - 1) = 33550336212(2131)=33550336. This showed that Nicomachus's first assertion is false since the fifth perfect number has 8 digits. Nicomachus's claim that perfect numbers ended in 6 and 8 alternately still stood however. It is perhaps surprising that Regius, who must have thought he had made one of the major breakthroughs in mathematics, is virtually unheard of today.

J Scheybl gave the sixth perfect number in 1555 in his commentary to a translation of Euclid's Elements. This was not noticed until 1977 and therefore did not influence progress on perfect numbers.

The next step forward came in 1603 when Cataldi found the factors of all numbers up to 800 and also a table of all primes up to 750 (there are 132 such primes). Cataldi was able use his list of primes to show that 2171=1310712^{17}- 1 = 1310712171=131071 is prime (since 7502=562500>131071750^{2} = 562500 > 1310717502=562500>131071 he could check with a tedious calculation that 131071 had no prime divisors). From this Cataldi now knew the sixth perfect number, namely 216(2171)=85898690562^{16}(2^{17} - 1) = 8589869056216(2171)=8589869056. This result by Cataldi showed that Nicomachus's assertion that perfect numbers ended in 6 and 8 alternately was false since the fifth and sixth perfect numbers both ended in 6. Cataldi also used his list of primes to check that 2191=5242872^{19} - 1 = 5242872191=524287 was prime (again since 7502=562500>524287750^{2} = 562500 > 5242877502=562500>524287) and so he had also found the seventh perfect number, namely 218(2191)=1374386913282^{18}(2^{19} - 1) = 137438691328218(2191)=137438691328.

As the reader will have already realised, the history of perfect numbers is littered with errors and Cataldi, despite having made the major advance of finding two new perfect numbers, also made some false claims. He writes in Utriusque Arithmetices that the exponents ppp = 2, 3, 5, 7, 13, 17, 19, 23, 29, 31, 37 give perfect numbers 2p1(2p1)2^{p-1}(2^{p} - 1)2p1(2p1). He is, of course, right for ppp = 2, 3, 5, 7, 13, 17, 19 for which he had a proof from his table of primes, but only one of his further four claims 23, 29, 31, 37 is correct.

Many mathematicians were interested in perfect numbers and tried to contribute to the theory. For example Descartes, in a letter to Mersenne in 1638, wrote [8]:-

... I think I am able to prove that there are no even numbers which are perfect apart from those of Euclid; and that there are no odd perfect numbers, unless they are composed of a single prime number, multiplied by a square whose root is composed of several other prime number. But I can see nothing which would prevent one from finding numbers of this sort. For example, if 22021 were prime, in multiplying it by 9018009 which is a square whose root is composed of the prime numbers 3, 7, 11, 13, one would have 198585576189, which would be a perfect number. But, whatever method one might use, it would require a great deal of time to look for these numbers...The next major contribution was made by Fermat. He told Roberval in 1636 that he was working on the topic and, although the problems were very difficult, he intended to publish a treatise on the topic. The treatise would never be written, partly because Fermat never got round to writing his results up properly, but also because he did not achieve the substantial results on perfect numbers he had hoped. In June 1640 Fermat wrote to Mersenne telling him about his discoveries concerning perfect numbers. He wrote:-

- When the exponent of a radical number is composite, its radical is also composite. Just as 6, the exponent of 63, is composite, I say that 63 will be composite.
- When the exponent is a prime number, I say that its radical less one is divisible by twice the exponent. Just as 7, the exponent of 127, is prime, I say that 126 is a multiple of 14.
- When the exponent is a prime number, I say that its radical cannot be divisible by any other prime except those that are greater by one than a multiple of double the exponent...Shortly after writing this letter to Mersenne, Fermat wrote to Frenicle de Bessy on 18 October 1640. In this letter he gave a generalisation of results in the earlier letter stating the result now known as Fermat's Little Theorem which shows that for any prime ppp and an integer aaa not divisible by ppp, ap11a^{p-1}- 1ap11 is divisible by ppp. Certainly Fermat found his Little Theorem as a consequence of his investigations into perfect numbers.

Using special cases of his Little Theorem, Fermat was able to disprove two of Cataldi's claims in his June 1640 letter to Mersenne. He showed that 22312^{23} - 12231 was composite (in fact 2231=47×1784812^{23} - 1 = 47 \times 1784812231=47×178481) and that 23712^{37} - 12371 was composite (in fact 2371=223×6163181772^{37} - 1 = 223 \times 6163181772371=223×616318177). Frenicle de Bessy had, earlier in that year, asked Fermat (in correspondence through Mersenne) if there was a perfect number between 102010^{20}1020 and 102210^{22}1022. In fact assuming that perfect numbers are of the form 2p1(2p1)2^{p-1}(2^{p} - 1)2p1(2p1) where ppp is prime, the question readily translates into asking whether 23712^{37} - 12371 is prime. Fermat not only states that 23712^{37} - 12371 is composite in his June 1640 letter, but he tells Mersenne how he factorised it.

Fermat used three theorems:-

(i) If nnn is composite, then 2n12^{n} - 12n1 is composite.

(ii) If nnn is prime, then 2n22^{n} - 22n2 is a multiple of 2n2n2n.

(iii) If nnn is prime, ppp a prime divisor of 2n12^{n}- 12n1, then p1p - 1p1 is a multiple of nnn.Note that (i) is trivial while (ii) and (iii) are special cases of Fermat's Little Theorem. Fermat proceeds as follows: If ppp is a prime divisor of 237 - 1, then 37 divides p1p - 1p1. As ppp is odd, it is a prime of the form 2×37m+12 \times 37m+12×37m+1, for some mmm. The first case to try is ppp = 149 and this fails (a test division is carried out). The next case to try is 223 (the case m=3m = 3m=3) which succeeds and 2371=223×6163181772^{37} - 1 = 223 \times 6163181772371=223×616318177.

Mersenne was very interested in the results that Fermat sent him on perfect numbers and soon produced a claim of his own which was to fascinate mathematicians for a great many years. In 1644 he published Cogitata physica mathematica in which he claimed that 2p12^{p} - 12p1 is prime (and so 2p1(2p1)2^{p-1}(2^{p} - 1)2p1(2p1) is a perfect number) for

p=2,3,5,7,13,17,19,31,67,127,257p = 2, 3, 5, 7, 13, 17, 19, 31, 67, 127, 257p=2,3,5,7,13,17,19,31,67,127,257and for no other value of ppp up to 257. Now certainly Mersenne could not have checked these results and he admitted this himself saying:-

... to tell if a given number of 15 or 20 digits is prime, or not, all time would not suffice for the test.The remarkable fact is that Mersenne did very well if this was no more than a guess. There are 47 primes ppp greater than 19 yet less than 258 for which 2p12^{p} - 12p1 might have been either prime or composite. Mersenne got 42 right and made 5 mistakes. A suggestion as to the rule he used in giving his list is made in [9].

Primes of the form 2p12^{p}- 12p1 are called Mersenne primes.

The next person to make a major contribution to the question of perfect numbers was Euler. In 1732 he proved that the eighth perfect number was 230(2311)=23058430081399521282^{30}(2^{31} - 1) = 2305843008139952128230(2311)=2305843008139952128. It was the first new perfect number discovered for 125 years. Then in 1738 Euler settled the last of Cataldi's claims when he proved that 22912^{29} - 12291 was not prime (so Cataldi's guesses had not been very good). It should be noticed (as it was at the time) that Mersenne had been right on both counts, since p=31p = 31p=31 appears in his list but p=29p = 29p=29 does not.

In two manuscripts which were unpublished during his life, Euler proved the converse of Euclid's result by showing that every even perfect number had to be of the form 2p1(2p1)2^{p-1}(2^{p} - 1)2p1(2p1). This verifies the fourth assertion of Nicomachus at least in the case of even numbers. It also leads to an easy proof that all even perfect numbers end in either a 6 or 8 (but not alternately). Euler also tried to make some headway on the problem of whether odd perfect numbers existed. He was able to prove the assertion made by Descartes in his letter to Mersenne in 1638 from which we quoted above. He went a little further and proved that any odd perfect number had to have the form

(4n+1)4k+1b2(4n+1)^{4k+1} b^{2}(4n+1)4k+1b2where 4n+14n+14n+1 is prime. However, as with most others whose contribution we have examined, Euler made predictions about perfect numbers which turned out to be wrong. He claimed that 2p1(2p1)2^{p-1}(2^{p} - 1)2p1(2p1) was perfect for p=41p = 41p=41 and p=47p = 47p=47 but Euler does have the distinction of finding his own error, which he corrected in 1753.

The search for perfect numbers had now become an attempt to check whether Mersenne was right with his claims in Cogitata physica mathematica . In fact Euler's results had made many people believe that Mersenne had some undisclosed method which would tell him the correct answer. In fact Euler's perfect number 230(2311)2^{30}(2^{31} - 1)230(2311) remained the largest known for over 150 years. Mathematicians such as Peter Barlow wrote in his book Theory of Numbers published in 1811, that the perfect number 230(2311)2^{30}(2^{31} - 1)230(2311):-

... is the greatest that ever will be discovered; for as they are merely curious, without being useful, it is not likely that any person will ever attempt to find one beyond it.This, of course, turned out to be yet one more false assertion about perfect numbers!

The first error in Mersenne's list was discovered in 1876 by Lucas. He was able to show that 26712^{67} - 12671 is not a prime although his methods did not allow him to find any factors of it. Lucas was also able to verify that one of the numbers in Mersenne's list was correct when he showed that 212712^{127} - 121271 is a Mersenne prime and so 2126(21271)2^{126}(2^{127}- 1)2126(21271) is indeed a perfect number. Lucas made another important advance which, as modified by Lehmer in 1930, is the basis of computer searches used today to find Mersenne primes, and so to find perfect numbers. Following the announcement by Lucas that p=127p = 127p=127 gave the Mersenne prime 2p12^{p} - 12p1, Catalan conjectured that, if m=2p1m = 2^{p} - 1m=2p1 is prime then 2m12^{m} - 12m1 is also prime. This Catalan sequence is 2p12^{p} - 12p1 where

p=p =p= 3, 7, 127, 170141183460469231731687303715884105727, ...Of course if this conjecture were true it would solve the still open question of whether there are an infinite number of Mersenne primes (and also solve the still open question of whether there are infinitely many perfect numbers). However checking whether the fourth term of this sequence, namely 2p12^{p} - 12p1 for p=p =p= 170141183460469231731687303715884105727, is prime is well beyond what is possible.

In 1883 Pervusin showed that 260(2611)2^{60}(2^{61}- 1)260(2611) is a perfect number. This was shown independently three years later by Seelhoff. Many mathematicians leapt to defend Mersenne saying that the number 67 in his list was a misprint for 61.

In 1903 Cole managed to factorise 26712^{67} - 12671, the number shown to be composite by Lucas, but for which no factors were known up to that time. In October 1903 Cole presented a paper On the factorisation of large numbers to a meeting of the American Mathematical Society. In one of the strangest 'talks' ever given, Cole wrote on the blackboard

2671=1475739525896764129272^{67} - 1 = 1475739525896764129272671=147573952589676412927.Then he wrote 761838257287 and underneath it 193707721. Without speaking a work he multiplied the two numbers together to get 147573952589676412927 and sat down to applause from the audience. [It is worth remarking that the computer into which I (EFR) am typing this article gave this factorisation of 26712^{67} - 12671 in about a second - times have changed!]

Further mistakes made by Mersenne were found. In 1911 Powers showed that 288(2891)2^{88}(2^{89} - 1)288(2891) was a perfect number, then a few years later he showed that 210712^{107}- 121071 is a prime and so 2106(21071)2^{106}(2^{107}- 1)2106(21071) is a perfect number. In 1922 Kraitchik showed that Mersenne was wrong in his claims for his largest prime of 257 when he showed that 225712^{257}- 122571 is not prime.

We have followed the progress of finding even perfect numbers but there was also attempts to show that an odd perfect number could not exist. The main thrust of progress here has been to show the minimum number of distinct prime factors that an odd perfect number must have. Sylvester worked on this problem and wrote (see [20]):-

... the existence of [ an odd perfect number] - its escape, so to say, from the complex web of conditions which hem it in on all sides - would be little short of a miracle.In fact Sylvester proved in 1888 that any odd perfect number must have at least 4 distinct prime factors. Later in the same year he improved his result to five factors and, over the years, this has been steadily improved until today we know that an odd perfect number would have to have at least eight distinct prime factors, and at least 29 prime factors which are not necessarily distinct. It is also known that such a number would have more than 300 digits and a prime divisor greater than 10610^{6}106. The problem of whether an odd perfect number exists, however, remains unsolved.

Today (2020) 51 perfect numbers are known, 288(2891)2^{88}(2^{89}- 1)288(2891) being the last to be discovered by hand calculations in 1911 (although not the largest found by hand calculations), all others being found using a computer. In fact computers have led to a revival of interest in the discovery of Mersenne primes, and therefore of perfect numbers. At the moment the largest known Mersenne prime is 28258993312^{82589933} - 12825899331 (which is also the largest known prime) and the corresponding largest known perfect number is 282589932(2825899331)2^{82589932} (2^{82589933} - 1)282589932(2825899331). It was discovered in December 2018 and this, the 51st such prime to be discovered, contains more than 23 million digits. If you wonder why we have not included the number in decimal form, then let me say that it contains about 860 times as many characters as this whole article on perfect numbers. Also worth noting is the fact that although this is the 51st to be discovered, it might not be the 51st largest perfect number as not all smaller cases have been ruled out. See the Official announcement.