Toby Jake Allen

Perfect Numbers are numbers that equal the sum of their factors divided by two. 6 is perfect, as its factors are 1, 2, 3 and 6; and (1+2+3+6)/2 = 6. Here are the first 4: 6, 28, 496, 8128. As you can see, they get big very fast.
This is a proof that all perfect numbers have a, well… it’s a little complicated.

Powers

Let’s look at the powers of 3, as 3 is the first odd prime and hence the smallest number that applies here. 3^1 = 3, 3^2 = 9, 3^3 = 27 and so on. 1 has no prime factors (1 is not prime) and 1 factor – 1. 3 has 1 prime factor – 3 – and 2 factors – 1 and 3. 9 has 2 prime factors – 3 and 3 – and 3 factors – 1, 3, and 9; and so on. Now let’s look at the sums.

1: 0 prime factors and 1 factor. The parity of the sum of 1’s factors is odd.
3: 1 prime factor and 2 factors. The parity of the sum of 3’s factors is even.
9: 2 prime factors and 3 factors. The parity of the sum of 9’s factors is odd.
27: 3 prime factors and 4 factors. The parity of the sum of 27’s factors is even.

The parity is important because it must be even for the number to be perfect, as the sum of the factors must be 2n. 2n is an even number, provided that n is an integer. And the parity switches each time we add another factor of 3.

Importantly, just because the parity of the sum of 3’s factors is even does not mean that it is perfect. It just means that it is still a candidate.

Now, looking at the list, it seems that the parity of the sum of the factors is always opposite to the parity of the prime factor count. However, this is not the case. Let us make a new list, this time of numbers of the form 3^n * 5.

5: 1 prime factor and 2 factors. The parity of the sum of 5’s factors is even.
15: 2 prime factors and 4 factors. The parity of the sum of 15’s factors is even.
45: 3 prime factors and 6 factors. The parity of the sum of 45’s factors is even.
135: 4 prime factors and 8 factors. The parity of the sum of 135’s factors is even.

The parity is always even. But the prime factor count counts 1, 2, 3, 4! This hypothesis has been proven wrong. Now there is an important difference between this list and the previous one. Look at the prime factor count. In list one, it counts 1, 2, 3, 4. In list two, it counts 2, 4, 6, 8. There’s the difference. Since all the factors are odd, each one changes the parity. In other words, the parity of the factor count (when all factors are odd) is equivalent to the parity of the sum of the factors, and it was a coincidence that it happened to line up with the prime factors too.

Combinations

But why were the factors 1, 2, 3, 4 in the first list and 2, 4, 6, 8 in the second? Let’s look at the prime factors again, but this time, not just as a count:

5: 5
15: 3, 5
45: 3^2, 5
135: 3^3, 5

Now let’s look at the factors:

5: 1, 5
15: 1, 3, 5, 15
45: 1, 3, 9, 5, 15, 45
135: 1, 3, 9, 27, 5, 15, 45, 135

Now let’s split the lists up, into factors who have 5 as a factor and factors who don’t. (We will be including 1 in the second list, and the second list will be written first.)

5: 1; 5
15: 1, 3; 5, 15
45: 1, 3, 9; 5, 15, 45
135: 1, 3, 9, 27; 5, 15, 45, 135

The list on the right is just the list on the left x5 – 1×5 = 5, 3×5 = 15, 9×5 = 45, 27×5 = 135. This is because the factors of 3^n are 1, 3, 9… 3^n-1, 3^n. When you multiply the number by 5, then you multiply all the factors by 5 too and get two sets of factors. But why doesn’t the same doubling thing happen when we multiply 3^n by 3? Actually, it does! However, the two lists have so many overlaps that only one new number emerges. For example, 27 has factors 1, 3, 9, and 27. Multiply by 3 and the two lists are 1, 3, 9, 27 and 3, 9, 27, 81. But we already have 3, 9 and 27, so we have to remove them to avoid double-counting.

This can get quite confusing, but there is a solution. We can figure out the exact amount of factors based on prime factor powers. For instance, 90 = 2 x 3 x 3 x 5. We can represent this as 1, 2, 1, 0, 0…
The 1 says there is 1 2. The 2 says there are 2 3s. The next 1 says there is 1 5, and so on for each prime.

Now let us look again at the very first list, or at least part of it:

1: 0 prime factors and 1 factor.
3: 1 prime factor and 2 factors.
9: 2 prime factors and 3 factors.
27: 3 prime factors and 4 factors.

When there is only one type of prime factor, f = p+1 (where f is factors and p is prime factors.)

Next, let us look at some combinations. 5^2 (25) x 3^3 (27) = 675. The factors of 25 are 1, 5, and 25, whereas the factors of 27 are 1, 3, 9, and 27. Let’s make a grid.

1 5 25
1 1 5 25
3 3 15 75
9 9 45 225
27 27 135 675

3 x 4 = 12, and here is why this applies: There are 4 factors of 27 and 3 factors of 25, and each can combine in their own unique way. This creates a grid like the one above, with twelve factors in it.

This only works because 25 and 27 are perfect powers. If there were any factors shared, they would overlap in all sorts of weird ways and it would not be a nice multiplication.

Now we have a formula! Say we input 5, 3, 1, 7, 2, 0, 0, 0… . We add one to each value: 6, 4, 2, 8, 3, 1, 1, 1… . Next we multiply them all together: 6 * 4 = 24, 24 * 2 = 48, 48*8 = 388, 388 * 3 = 1164. Therefore, whatever monstrosity of a number has this as its ‘factor list’ will have 1164 factors. SOLVED! But wait a minute…

Solved

This doesn’t work! But with one small tweak it does. We’re counting even prime factors as if they add to the total, but they don’t. Here’s the table for 2, 3, 0, 0, 0…

1 2 4
1 1 2 4
3 3 6 12
9 9 18 36
27 27 54 108

It only has 4 odd factors, as all the other ones have a 2 hiding in them somewhere. The clones of the 1, 3, 9, 27 factor list are only even.

So all we have to do is ignore even numbers. Let’s try this again, this time inputting a number, not a prime power list. Let’s make the number 132. First we can take out a factor of 2: 132/2 = 66. 66 has another factor of 2: 66/2 = 33. And now 33 = 3 x 11. Let’s arrange this as a prime factor list:

2, 1, 0, 0, 1, 0, 0… . Next we add 1 to everything: 3, 2, 1, 1, 2, 1, 1… . Finally let’s get rid of the 2s and multiply! 1 x 2 x 1 x 1 x 2 x 1 x 1… = 4. 132 has 4 odd factors, making it a candidate.

This works for any number – we’ve done it!

Generalisation

Now we get to generalise! We can do this (with some adjustment) for all primes.
For 2 then we need the mod2(n’s factors) to be 0 for n to be perfect. Now we need mod3(n’s factors) to be equal to mod3(n) for it to work. But does this apply to all numbers, therefore ruining it?

Let’s look at a few examples.

1: mod3(1) = mod3(1)
2: mod3(3) ≠ mod3(2)
3: mod3(4) ≠ mod3(3)
4: mod3(7) = mod3(4)
5: mod3(6) ≠ mod3(5)
6: mod3(12) = mod3(6)
7: mod3(8) ≠ mod3(7)
8: mod3(15) ≠ mod3(8)
9: mod3(13) ≠ mod3(9)
10: mod3(16) = mod3(10)

This actually gets rid of a lot of numbers!
Now let’s combine it for 2 and 3.

1: mod2(1) = 1
2: mod2(3) = 1
3: mod2(4) = 0, mod3(4) ≠ mod3(3)
4: mod2(7) = 1
5: mod2(6) = 0, mod3(6) ≠ mod3(5)
6: mod2(12) = 0, mod3(12) = mod3(6)
7: mod2(8) = 0, mod3(8) ≠ mod3(7)
8: mod2(15) = 1
9: mod2(13) = 1
10: mod2(16) = 0, mod3(16) = mod3(10)

According to this test, the first two perfect numbers are 6 and 10. But we can add 5 to the test and hopefully get rid of 10.

10: mod2(16) = 0, mod3(16) = mod3(10), mod5(16) ≠ mod5(10)

Okay, we’re good. This definitely works for all perfect numbers, BUT triperfect numbers might be able to sneak in on occasion. Triperfect numbers are where