Skip to content
Starts With A Bang

Celebrate The Math Holiday Of ‘Perfect Number Day’ Every June 28th

There are only two perfect numbers that fit on the calendar: 6 and 28, making June 28th Perfect Number Day. Find out what makes a number perfect, and why they matter.

Perfection is an unattainable quest for which we all strive. But for a number, mathematically, being ‘perfect’ has a very specific definition that only a few select numbers can fulfill. A number is perfect if all of its factors, including 1 but excluding itself, perfectly add up to the number you began with. 6, for example, is perfect, because its factors — 3, 2, and 1 — all sum up to 6. 28 is perfect too: 14, 7, 4, 2, and 1 add up to 28.

But perfect numbers aren’t common at all. There are only two more, 496 and 8,128, below a million. Only 50 total perfect numbers are known, even with a dedicated worldwide effort to computationally discover more. Yet they have deep connections to some of the greatest mathematical questions of our time. While some may memorialize June 28th (6/28) as Tau Day, in celebration of the fact that τ = 2π, you simply can’t top a celebration of numbers that are truly perfect.

Pi, or 3.14159…, is the ratio of a circle’s circumference to its diameter. Tau, which is the circumference-to-radius ratio, is twice as large. But although 6.28… might seem like it deserves a June 28th celebration, perfect numbers are far more worthy. (Public domain)

The calendar numbers of June 28th — 6 and 28 — have some very special properties that are worthy of a celebration. Unless you were born in the year 496, or are a time-traveler back from the year 8128, the only perfect numbers that will ever appear on your calendar are 6 and 28.

If you can factor a number into all of its divisors, you can immediately add them all up and discover, for yourself, whether your number is perfect or not. For the first few numbers, this is a straightforward task, and you can see that most numbers aren’t perfect at all: they’re either abundant or deficient.

The first few countable numbers are mostly deficient, but 6 is a perfect number: the first and easiest one to discover. (E. Siegel)

If you add up all the positive factors of any number not including itself, you’ll get a number that’s either smaller than, greater than, or exactly equal to the original number.

If you add up all the factors excluding itself and get a number that’s less than the original one you started with, we call that number deficient. All prime numbers are maximally deficient, since its only factors are 1 and itself, and all powers of two (4, 8, 16, 32, etc.) are minimally deficient, with their sums falling just 1 shy of being perfect.

On the other hand, you might add up all the factors of a number excluding itself and get a number that’s greater than the original number; those numbers are abundant. You might look at the table above and think abundant numbers are rare, but 18, 20, 24, 30, 36 and many more are abundant; they’re quite common as you start looking at larger and larger numbers.

The factors of the first four perfect numbers. If you exclude the numbers themselves, all the other factors (or divisors) sum up to the number in question, proving that they meet the criteria for perfect numbers. (E. Siegel)

But perfect numbers — what Euclid called “τέλειος ἀριθμός” — are rare! For over a thousand years, only those first four were known.

You might look at these numbers, the ones that happen to be perfect, and start to notice a pattern here as to how these numbers can be broken down. They’re all the result of multiplying 2 to some power, let’s call it X, by a prime number. And interestingly, the prime number you’re multiplying it by is always equal to one less than double what 2^X is.

Different ways of breaking down the first four perfect numbers reveal a suggestive pattern as to how they might be generated. (E. Siegel)

There’s a good reason for this. Remember, all powers of two — numbers like 2, 4, 8, 16, 32, etc. — are minimally deficient, where they were just 1 shy of being perfect numbers. At the same time, all prime numbers are maximally deficient, where their only factors are 1 and themselves. This means there are possible combinations of powers of two and prime numbers, minimally and maximally deficient numbers, that have a chance to be perfect themselves.

Not every minimally deficient and maximally deficient combination of numbers gives you a perfect number, though. If you look at the “prime factor breakdown” of perfect numbers, it looks like there’s a pattern for generating them! In fact, you might guess that the pattern goes something like this:

The pattern that you might guess for all perfect numbers, based on the prime numbers we know, can only give you candidate perfect numbers. Many of these are not primes, and do not generate perfect numbers. (E. Siegel)

After all, the first four prime numbers are 2, 3, 5 and 7, so you might think if we simply plugged prime numbers into this formula we stumbled into at the right — where n is a prime number and the formula is 2^(n-1) * (2^n — 1) — we’d start generating perfect numbers. And you might think that this works for all primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, and so on.

As it turns out, this is a great way to generate candidate perfect numbers, but not necessarily perfect numbers themselves. In fact, all known perfect numbers do follow this formula, where n is a prime number and “2^(n-1) * (2^n — 1)” gives you a perfect number. But it isn’t true that all prime numbers generate a perfect number; it only works for a select few!

The first five perfect numbers, and some interesting numerical properties that they exhibit in terms of generating them. (Wikipedia page on Perfect Numbers)

The one you might think ought to have been the 5th perfect number — 2096128, which is 2¹⁰ * (2¹¹ — 1) — is actually an abundant number. It isn’t just random; there’s a reason. For 2, 3, 5, and 7, the (2^n — 1) part of the equation gave prime numbers: 3, 7, 31, and 127. The reason 2096128 isn’t a perfect number is because that part in parentheses, 2¹¹ — 1 (which is 2047), isn’t itself prime!

2047 can be factored: 23 * 89, and therefore it isn’t prime. Because of this, the number 2096128, or 2¹⁰ * (2¹¹ — 1), isn’t a perfect number, either!

It isn’t enough to take your formula, 2^(n-1) * (2^n — 1), for n being just a regular prime number; you need to ensure that the (2^n — 1) in your formula gives you a prime number as well. This type of prime — where n is prime and (2^n — 1) is also prime — is called a Mersenne prime. Named after the monk who studied them hundreds of years ago, there are (as of 2018) only 50 of them known in all existence. And they rise in size very quickly!

The ways to generate the first 16 perfect numbers, and the Mersenne Primes that they correspond to. Note how quickly these numbers rise, and also how recently they were discovered. Up until the 1950s, only 12 Mersenne primes were known. (Screenshot from Wikipedia / Mersenne Primes)

The largest of the 50 Mersenne primes is, at present, 2⁷⁷²³²⁹¹⁷–1, which has over 23 million digits in it written out! It’s uncertain that this is the 50th Mersenne prime because, although the first 42 Mersenne primes have been verified to be in order, there are large untested gaps of candidate Mersenne primes out there. The perfect number that this corresponds to contains a whopping 46,498,849 digits, and would take about 16,000 printed pages to display.

There is also, believe it or not, a search that the computer-savvy among you can participate in: the Great Internet Mersenne Prime Search, including cash prizes for finding new ones!

Why would people care about primes like the Mersenne Primes? Chris Caldwell of the University of Tennessee-Martin has a FAQ that explains why. (Chris Caldwell / UT-Martin)

If you wanted a little conjecture as to how to break the current record, here’s a fun piece of information you may want to consider. In addition to the numbers 3, 7, and 127 (the 1st, 2nd and 4th Mersenne primes), the number 170,141,183,460,469,231,731,687,303,715,884,105,727 is a Mersenne prime as well (the 12th), with 38 digits in it. That means that in addition to 6, 28, and 8,128, the following number is absolutely perfect as well: 14,474,011,154,664,524,427,946,373,126,085,988,481,573,677,491,474,835,889,066,354,349,131,199,152,128.

Many have conjectured that it’s very likely that (2¹⁷⁰¹⁴¹¹⁸³⁴⁶⁰⁴⁶⁹²³¹⁷³¹⁶⁸⁷³⁰³⁷¹⁵⁸⁸⁴¹⁰⁵⁷²⁷–1) is a Mersenne prime, too, and would be one containing — are you ready — over 10³⁷ digits! Why do I believe that? Because of a little pattern, first noticed centuries ago:

A fascinating pattern in Mersenne primes that was noted by Euler hundreds of years ago; it may lead us to the largest Mersenne Prime of all, and it may give us a way, if the pattern continues infinitely, to generate arbitrarily large Mersenne Primes. (E. Siegel)

The first four numbers that follow this pattern are definitely Mersenne primes, but is the fifth? And more over, is this a valid way to generate an infinite number of Mersenne primes? [This pattern may not necessarily hold up; there are many examples of Mersenne primes n — such as 8191, 131071, and 524287 — where 2^n — 1 (e.g., 2⁸¹⁹¹ — 1) is not a Mersenne prime itself!]

The discovery of the first billion digit Mersenne prime — that is a Mersenne prime with only 10⁹ (or more) digits — will net you a cool quarter-of-a-million dollars, but only if you can verify it! A more conceivable test, although it will only get you to around 6 × 10⁸ digits (and a less lucrative prize of $150,000), would be to test whether (2²¹⁴⁷⁴⁸³⁶⁴⁷–1) is a Mersenne prime.

Leonhard Euler, famed mathematician, discovered the Mersenne Prime ²³¹-1, which corresponds to a perfect number. Discovered in 1772 by Euler, it remained the largest known prime for over 90 years. There is an unproven conjecture that ²²¹⁴⁷⁴⁸³⁶⁴⁷–1 is a Mersenne Prime, too. (Jakob Emanuel Handmann, painter)

Many candidate Mersenne primes have been shot down by showing they can be factored, usually into two primes. Just as 2047 = 23 * 89, many other candidate Mersenne primes have been shown not to be. In 1903, it was already known that (2⁶⁷ — 1) was not a Mersenne prime, but no one knew what its factors were. Frank Nelson Cole gave a talk to the American Mathematical Society entitled “On the Factorization of Large Numbers.” On the left side of the board, he computed (2⁶⁷ — 1), which he showed equaled 147,573,952,589,676,412,927. On the right, he wrote 193,707,721 × 761,838,257,287, and spend his hour lecture saying nothing and working it out.

Travel the Universe with astrophysicist Ethan Siegel. Subscribers will get the newsletter every Saturday. All aboard!

At the end, when he showed both sides were equal, he sat down to a standing ovation, allegedly the first one ever given at a mathematics talk.

Today, checking a possible factorization is much easier to do with a robust computer program like Mathematica than it was by hand many decades ago. (E. Siegel / Mathematica)

The largest candidate Mersenne prime that’s been proven to be factorable so far is (2¹¹⁶⁸¹⁸³–1), which was shown (recently, in February 2014) to be able to be factored into 54,763,676,838,381,762,583 (which is prime) and a 351,639-digit number, which is thought to be prime as well.

It has been proven that all the even perfect numbers that exist are of the form that are generated by Mersenne primes that follow (2^n — 1), and it is conjectured (but not yet proven) that there are no odd perfect numbers; I have a feeling that accomplishing the latter (or, somehow, finding an odd perfect number) would be one of the greatest mathematical achievements of the century!

Computer programs with enough computational power behind them can brute-force analyze a candidate Mersenne prime to see if it corresponds to a perfect number or not. For small numbers, this can be accomplished easily; for large numbers, this task is extremely difficult. (C++ program originally from

So that’s what a perfect number is, and a whole bunch of interesting math behind it. Whether you write 6/28 or 28/6, I hope you enjoy this as perfect number day for all the June 28ths from here on out, as these rare numbers may yet have even more to teach us about the search for truth and beauty that goes beyond the limitations of our physical Universe!

Ethan Siegel is the author of Beyond the Galaxy and Treknology. You can pre-order his third book, currently in development: the Encyclopaedia Cosmologica.


Up Next