On this page
The number 4 can be written as a sum of positive whole numbers in five ways, and 9 in thirty. Both are multiples of 5, and that is no accident. Below you build the table, check Ramanujan's patterns for 5, 7 and 11, and see why 13 breaks the run.
What are Ramanujan's partition congruences?
A partition of n is a way of writing n as a sum of positive integers, ignoring order, and p(n) counts them; our guide to integer partitions covers the counting from scratch. So p(4) = 5: the partitions are 4, 3+1, 2+2, 2+1+1 and 1+1+1+1.
Ramanujan's three congruences are p(5n+4) ≡ 0 (mod 5), p(7n+5) ≡ 0 (mod 7) and p(11n+6) ≡ 0 (mod 11), for every whole number n (Wikipedia, Ramanujan's congruences). The same article says he proved the first two in a 1919 paper.
How do you compute p(n) up to 30 by hand?
Euler's pentagonal number theorem gives a recurrence: p(n) = p(n−1) + p(n−2) − p(n−5) − p(n−7) + p(n−12) + p(n−15) − ..., with p(0) = 1 and p of a negative number equal to 0 (Wikipedia, pentagonal number theorem). The offsets are the generalised pentagonal numbers 1, 2, 5, 7, 12, 15, 22, 26, ..., and the signs go in pairs: plus, plus, minus, minus.
Try p(10): p(9) + p(8) − p(5) − p(3) = 30 + 22 − 7 − 3 = 42. For p(30) you need eight terms: 4565 + 3718 − 1958 − 1255 + 385 + 176 − 22 − 5 = 5604. The results match OEIS entry A000041:
n = 0 to 9: 1, 1, 2, 3, 5, 7, 11, 15, 22, 30
n = 10 to 19: 42, 56, 77, 101, 135, 176, 231, 297, 385, 490
n = 20 to 30: 627, 792, 1002, 1255, 1575, 1958, 2436, 3010, 3718, 4565, 5604
Do the congruences hold up to n = 30?
Pick out the right positions and divide:
Mod 5 (n = 4, 9, 14, 19, 24, 29): 5, 30, 135, 490, 1575, 4565 are 1, 6, 27, 98, 315 and 913 times 5.
Mod 7 (n = 5, 12, 19, 26): 7, 77, 490, 2436 are 1, 11, 70 and 348 times 7.
Mod 11 (n = 6, 17, 28): 11, 297, 3718 are 1, 27 and 338 times 11.
All 13 checks pass, and p(19) = 490 passes two of them at once.
How does Dyson's rank explain the congruences for 5 and 7?
The rank of a partition is its largest part minus its number of parts (Wikipedia, rank of a partition). Freeman Dyson introduced it in 1944 in the Cambridge journal Eureka. He conjectured that the ranks of partitions of 5n+4 fall equally into the five remainder classes mod 5, and those of 7n+5 equally into the seven classes mod 7.
Check it on p(4) = 5. The ranks of 4, 3+1, 2+2, 2+1+1 and 1+1+1+1 are 3, 1, 0, −1 and −3, leaving remainders 3, 1, 0, 4 and 2 mod 5: one partition in each class. For p(5) = 7 the ranks are 4, 2, 1, 0, −1, −2, −4, giving remainders 4, 2, 1, 0, 6, 5, 3 mod 7: again one in each. Equal piles mean the total must be a multiple of 5 or 7.
A. O. L. Atkin and Peter Swinnerton-Dyer proved Dyson's conjectures in 1954 (Proceedings of the London Mathematical Society). The rank fails for 11: it does not split partitions of 11n+6 into 11 equal classes (Wikipedia, crank of a partition). You can see this on p(6) = 11: the ranks leave remainders 1 and 10 twice each and never 4 or 7. Dyson hypothesised a "crank" that would work for 11, and George Andrews and Frank Garvan found it in 1988 (Bulletin of the AMS).
Why is there no Ramanujan congruence for 13?
The offsets 4, 5 and 6 are not arbitrary. Kiming and Olsson proved that any congruence p(ℓn+β) ≡ 0 (mod ℓ) must have β ≡ 1/24 (mod ℓ), as Ahlgren, Beckwith and Raum explain in their paper on the scarcity of partition congruences. Check: 24 × 4 = 96 leaves 1 mod 5, 24 × 5 = 120 leaves 1 mod 7, and 24 × 6 = 144 leaves 1 mod 11.
For 13, 144 = 11 × 13 + 1, so the only candidate is p(13n+6). It fails at once: p(6) = 11 is not a multiple of 13, and nor is p(19) = 490. The same paper records that Ahlgren and Boylan proved in 2003 that no prime 13 or larger has a congruence of this simple form (Inventiones Mathematicae). Subtler patterns survive: Atkin found congruences mod 13 on progressions of the form 13 × 11³ n + β.
How can you explore this yourself?
Extend the recurrence to n = 40 and check the next two cases of the mod 5 pattern.
List the 30 partitions of 9 and sort their ranks mod 5; you should get six in each class.
Compute 1/24 mod 17 and test whether p(17n+β) starts with a multiple of 17.
For more of Euler by hand, read how the Euler product formula ties primes to the zeta function and how he solved the Basel problem.
If modular inverses or generating functions are new to you, the Fermi Concept Library has every concept in mathematics with its own lesson and its place in the map. When a step in your own working goes wrong, the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.



