Tuesday, February 8, 2022

Perfect Number Generator

 


A perfect number is a positive integer which equals the sum of all its divisors, excluding itself. The first perfect number is 6 since 6 = 1 + 2 + 3. The next perfect number is 28 since 28 = 1 + 2 + 4 + 7 + 14.

Over two thousand years ago, Euclid found a formula for generating perfect numbers. The product of
(2p-1) and (2p-1) is a perfect number when p is a prime and 2p-1 is also a prime number. Many high prime numbers can be found using the formula 2p-1, but the formula doesn’t always produce prime numbers. When the formula does produce a prime number, it is called a Mersenne prime named after the French Friar, Marin Mersenne (Marin Mersenne - Wikipedia).

The ancients knew of the first four perfect numbers: 6, 28, 496 and 8128. Through trial division, the list was confirmed with three additional perfect numbers: 33550336, 8589869056 and 137438691328. In 1772 Euler found the eighth: 2305843008139952128 (with no modern computing aids). Euler also proved the converse of Euclid’s original proof, that is even numbers are perfect if and only if they can be expressed in the form (2p-1) (2p-1).

It is known that there are an infinite number of primes; however, it is not known if there are an infinite number of Mersenne prime numbers. As of this posting, there have been 51 confirmed Mersenne primes (the largest has over 24 million digits). If one were able to prove the Mersenne primes continue infinitely, then so would perfect numbers. The size of the perfect number associated with the largest known Mersenne prime has over 49 million digits.

Here is a link to a spreadsheet for calculating the first eight perfect numbers.

No comments:

Post a Comment

An Open Message to the Blog's Fans in Singapore

(Image:  Free 12 singapore icons - Iconfinder ) This past week, more views of this blog were made from Singapore than other country. To ackn...

Popular in last 30 days