## Wednesday, 19 November 2014

### Perfect numbers and Mersenne Primes

“One would be hard put to find a set of whole numbers with a more fascinating history and more elegant properties surrounded by greater depths of mystery—and more totally useless—than the perfect numbers.”
—Martin Gardner

While it is true that perfect numbers may not be as useful or evident in our environment as the Fibonacci series discussed last time, in terms of enigma and unresolved mysteries, nothing can probably come close to the magical perfect numbers. But first of all, what is a perfect number? What distinguishes a perfect number from it’s “imperfect” counterparts?
A number is said to be perfect if the sum of it’s proper divisors (excluding itself) is equal to the number itself. This sum is also called the “aliquot sum”. This statement is equivalent to the statement that the sum of the divisors of a perfect number and the perfect number is equal to two times the perfect number. Reading this definition at first might make finding perfect numbers sound like a huge ordeal. However, it is here that the true elegance of these numbers is shown. Before delving into the technicalities of perfect numbers, let us first explore the first few perfect numbers.

1.    6; 6 = 1 + 2 +3
2.   28; 28 = 1 + 2 + 4 + 7 + 14
3.   496; 496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248

These are the first 3 prime numbers. Observe that they are even numbers. In fact, it has been found that if an odd perfect number does exist, it must be larger than 101500 !

Euclid proved that if 2p-1 is a prime, then, (2p-1)(2p-1) is an even prime number. The prime number 2p-1  (where p is a prime) belongs to a special category of numbers called the Mersenne Primes, named after the monk Marin Mersenne. 2p-1 is a prime if and only if p is a prime; the converse, however, doesn’t hold true. Mersenne Primes and perfect numbers are closely related because each Mersenne Prime produces one even perfect number. This fact was proven by Leonhard Euler who showed that the formula (2p-1)(2p-1) will give all the even perfect numbers. The Great Internet Mersenne Prime Search (GIMPS) is a special program in which people use open software to find Mersenne Primes. The largest known prime as of April 2014 is 257,885,161  1 (or M57,885,161 in short). This is the 48th Mersenne Prime. Because we know 48 Mersenne Primes, we also know 48 even perfect numbers, the largest of which is 257885160 × (257885161  1) with 34,850,340 digits(!); corresponding to the 48th Mersenne Prime that we talked about in the above line.

The main two problems concerning perfect numbers that exist in the world of Math are- “Are there infinitely many perfect numbers?” and “Are there any odd perfect numbers?” The first question can also be extended to question the number of Mersenne Primes.

Now that the technicalities of perfect numbers are clear, let’s dive into some cool facts about perfect numbers.

1.    28 is the only even perfect number that can be represented as a sum of two cubes (27 and 1).

2.   No perfect number is a perfect square. So, the number of proper divisors of a perfect number (including the number itself) is always even.

3.   The sum of the reciprocals of the proper divisors of a perfect number (including the number itself) is 2. This follows directly from the fact the sum of the proper divisors of a perfect number is 2 times the perfect number.

4.   In base 10 representation, every even perfect number ends in either 6, or 28.

5.   The nth  triangular number is the sum of “n” natural numbers i.e (n(n+1))/2. Each even perfect number is the (2p-1)th triangular number; the sum of (2p-1) natural numbers.

6.   The binary representation of even perfect numbers is extremely special owing to their general formula. Any even perfect number (2p-1)(2p-1), in binary can be presented as a string of “p” ones, followed by “p-1” zeros. For example, (6)10 == (110)2 and (28)10 == (11100)2 . This also shows that the digital root of an even perfect number in binary representation will always be a prime (p is a prime). This makes even perfect numbers qualify for a special category of numbers called Pernicious numbers. A number is said to be Pernicious if the digital root (or digit sum) of it’s binary representation is a prime number.

7.   The difference of every even perfect number and the corresponding Mersenne prime is always divisible by the prime number involved in the formation of the Mersenne Prime. This means that (2p-1)(2p-1) - (2p-1) is always divisible by p.

Even though perfect numbers aren’t too useful in the real world, the little wonderful facts that they hide add to their charm. Studying them just for the sake of Math is what makes these unique numbers even more fun!