Here's a strange fact:
There's a pattern here, but it's hard to spot. Terms like will only appear when , where is an integer greater than 0. This means that if we continued this expansion we would run across terms like , but in order to know this for certain we need to prove that this pattern exists.
To get started, we should forget about the righthand side of the equations above and just focus on the left. We have the expression for all powers of . Multiplying this out will give us every multiplicative combination of possible as a result. Thinking in reverse, we can ask about how terms like may arise from this. Since must come from some multiplicative combinations of , we know that must come from an additive combination of (since ).
A breakdown of into smaller parts added together is known as a partition. Here, we're dealing specifically with partitions into distinct parts. If we apply this reasoning to by keeping track of the signs, we will see a neat pattern: terms of the form will be negative, will be positive, will be negative, and the pattern continues. This means that "odd" partitions will have negative coefficients while "even" partitions have positive coefficients. It follows that the coefficients of all terms on the right will have this form.
Which means that all of the numbers which show up in must have an imbalance of even and odd partitions into distinct parts; otherwise they will have a coefficient of . 5 and 7 have one more even partition than odd ones, while 12 and 15 have one more odd partition than even ones.
Why is it that the number of even and odd partitions balance out for most numbers except the ones equal to ? It has to do with how partitions can be found from other partitions. Consider 6, which partitions into 6, 5 + 1, 4 + 2, and 3 + 2 + 1. Starting from the first partition, 6, we can create a new partition by "shaving" one off the top of it to make 5 + 1. Likewise we can do this for the other two. To make this argument clearer, we can visualize partitions with dots on a hidden grid, known as a Ferrers diagram. Here are all the partitions of 6 represented by Ferrers diagrams.
We can see that 6 has just as many odd partitions as it does even, so doesn't appear in the expansion. Since there are an equal number of even and odd partitions, it makes sense to ask if there's a one-to-one mapping between them. One possible scheme comes from a "shaving" method, where the largest parts of a partition are "shaved" by 1. This works, as moving from 6 to 5 + 1 changes the partition from odd to even. Likewise, moving from 4 + 2 to 3 + 2 + 1 changes an even partition into an odd one.
Under this scheme, 5 + 1 doesn't map to 4 + 2 because the shaving operation doesn't change the number of rows. However, 6 doesn't map to 3 + 2 + 1 either since the shaving operation can only add one new row in a Ferrers diagram at a time. Larger partitions such as 5 + 4 will have both parts shaved to yield 4 + 3 + 2.
Since this scheme is supposed to be a one-to-one map between partitions, we can ask about doing this in reverse. The partition 5 + 3 + 1, for example, has no way of shaving off the top that works. 4 + 3 + 1 + 1 is disallowed since every part must be distinct, and 2 + 3 + 4 is disallowed since it doesn't change the oddness of the partition. Instead, 6 + 3 is the only partition which works under this mapping.
The key benefit to having a one-to-one mapping is that we can think of partitions as existing in pairs of even and odd partitions. If every odd partition of can be paired with an even partition of , then the expansion of will not have an term. This means that the shave mapping doesn't work for some .
There are some pathological partitions that don't work under this scheme.
If you were to count them up, you'll notice right away what the pattern is. Since these partitions do not map to anything, their terms in the expansion of won't fully cancel out to . Let's generalize this pattern. These partitions are made up of squares of length and triangles with base length or .
All the possible where this can happen is then just a sum of the number of dots in each shape.
We can conveniently combine both cases into one equation.
So the only terms that will show up in the expansion of will have an exponent with the form . Their sign depends on the "leftover" pathological partition, which is negative when the partition (a) is odd and positive when the partition (a) is even. Putting this all together gives us the pentagonal number theorem.
The pentagonal number theorem
Historically, the pentagonal number theorem was conjectured by Euler, but he failed to find a proof of it for several years. He did eventually find it, but to me his proof felt really unnatural and hard to follow. Instead, I presented a simpler proof by the mathemtician Fabian Franklin.