Home › Combinatorics › Lesson 8

Integer Partitions

Lesson 8 of 13

Key idea of this section

∑ₙ p(n) xⁿ = ∏ₖ≥₁ 1/(1 − xᵏ)
∏ₖ≥₁ (1 − xᵏ) = ∑ⱼ∈ℤ (−1)ʲ xj(3j−1)/2

Definitions and Ferrers diagrams

A partition of n is a weakly decreasing sequence λ = (λ₁ ≥ λ₂ ≥ ⋯ ≥ λₗ > 0) of positive integers with sum n; we write λ ⊢ n and call l the length. Its Ferrers diagram is the array of left-justified rows of λ₁, λ₂, … cells. Reflecting the diagram in its main diagonal gives the conjugate partition λ′, where λ′ⱼ is the number of parts λᵢ ≥ j. Conjugation is an involution, and it exchanges "the number of parts" with "the largest part." Consequently the number pₖ(n) of partitions of n into exactly k parts equals the number of partitions of n with largest part k, and the number of partitions with at most k parts equals the number with all parts at most k. Removing the first column of the diagram of a partition with exactly k parts shows pₖ(n) = p≤k(n − k), the number of partitions of n − k into at most k parts.

Generating functions

Choosing independently how many parts of each size k to use gives Euler's product ∑ p(n)xⁿ = ∏ₖ (1 − xᵏ)⁻¹; the product converges formally because only finitely many factors affect each coefficient. Restricting part sizes or multiplicities modifies the factors: partitions into parts at most k have generating function ∏ⱼ₌₁ᵏ (1 − xʲ)⁻¹, and partitions into distinct parts have ∏ₖ (1 + xᵏ). The first values of p(n) for n = 0, …, 20 are

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135, 176, 231, 297, 385, 490, 627,

and p(100) = 190,569,292. For at most three parts, partial fractions give the closed form p≤3(n) = the integer nearest to (n + 3)²/12; for instance p≤3(12) = 19.

Theorem 8.1 (Euler, 1748). The number of partitions of n into distinct parts equals the number of partitions of n into odd parts.

Proof. As formal power series, ∏ₖ (1 + xᵏ) = ∏ₖ (1 − x²ᵏ)/(1 − xᵏ). The numerator cancels every factor with an even exponent in the denominator, leaving ∏ over odd k of (1 − xᵏ)⁻¹. ∎ A bijective proof was given by Glaisher (1883): write each odd part's multiplicity in binary and merge equal parts, so that m copies of the odd part a, with m = 2e₁ + 2e₂ + ⋯ (distinct eᵢ), become the distinct parts a·2e₁, a·2e₂, …; uniqueness of the factorization of an integer as odd times a power of 2 makes this invertible. For n = 10 both counts equal 10.

Euler's pentagonal number theorem

The numbers j(3j − 1)/2 for j ∈ ℤ are the generalized pentagonal numbers 0, 1, 2, 5, 7, 12, 15, 22, 26, 35, 40, …, obtained alternately from j = 1, −1, 2, −2, …

Theorem 8.2 (Euler). ∏ₖ≥₁ (1 − xᵏ) = 1 + ∑ⱼ≥₁ (−1)ʲ [xj(3j−1)/2 + xj(3j+1)/2] = 1 − x − x² + x⁵ + x⁷ − x¹² − x¹⁵ + ⋯

Proof (Franklin, 1881). The coefficient of xⁿ on the left is E(n) − O(n), where E(n) and O(n) count partitions of n into an even and an odd number of distinct parts. We build a sign-reversing involution on most of these partitions. For a partition λ into distinct parts, let s be its smallest part and let t be the length of its "slope," the maximal run λ₁, λ₁ − 1, …, λ₁ − t + 1 of consecutive integers starting with the largest part. If s ≤ t, remove the smallest part and add 1 to each of the s largest parts; if s > t, subtract 1 from each of the t largest parts and append a new smallest part equal to t. Each move changes the number of parts by one and is inverse to the other, except when it is not defined: this happens precisely when the slope contains the smallest part and either s = t (then λ = (2j − 1, …, j), with n = j(3j − 1)/2) or s = t + 1 (then λ = (2j, …, j + 1), with n = j(3j + 1)/2), in each case with j parts. So E(n) − O(n) = 0 unless n is a generalized pentagonal number, in which case it is (−1)ʲ. ∎

Corollary 8.3. Multiplying Theorem 8.2 by ∑ p(n)xⁿ gives 1, so for n ≥ 1

p(n) = p(n − 1) + p(n − 2) − p(n − 5) − p(n − 7) + p(n − 12) + p(n − 15) − ⋯,

with p(m) = 0 for m < 0 and signs following the pattern + + − − + + − − ⋯. Since there are about √(8n/3) nonzero terms, this computes p(1), …, p(N) in O(N3/2) operations; MacMahon used it to tabulate p(n) for n ≤ 200, the table that Hardy and Ramanujan used to test their formula. For example, p(12) = p(11) + p(10) − p(7) − p(5) + p(0) = 56 + 42 − 15 − 7 + 1 = 77.

Asymptotics and arithmetic

Hardy and Ramanujan (1918) proved p(n) ~ eπ√(2n/3)/(4n√3), using the modularity of Dedekind's eta function η(τ) = q1/24 ∏(1 − qⁿ) and what became the circle method. Rademacher (1937) refined their series into a convergent exact formula. At n = 100 the leading term is about 1.993 × 10⁸, against the true value 1.906 × 10⁸, a relative error of about 4.6%. Ramanujan discovered the congruences p(5n + 4) ≡ 0 (mod 5), p(7n + 5) ≡ 0 (mod 7), and p(11n + 6) ≡ 0 (mod 11); for example p(4) = 5, p(5) = 7 and p(6) = 11, and p(17) = 297 = 27 · 11. Dyson's rank (1944) and the crank of Andrews and Garvan (1988) explain these combinatorially, and Ono (2000) showed that for every prime m ≥ 5 there are infinitely many congruences of the form p(An + B) ≡ 0 (mod m).

Gaussian binomial coefficients

The generating function, by size, of the partitions whose Ferrers diagram fits in a k × (n − k) box is the Gaussian binomial coefficient [n choose k]q = (1 − qⁿ)(1 − qⁿ⁻¹)⋯(1 − qⁿ⁻ᵏ⁺¹)/((1 − q)(1 − q²)⋯(1 − qᵏ)). It is a polynomial in q that reduces to C(n, k) at q = 1, and when q is a prime power it counts the k-dimensional subspaces of 𝔽qⁿ.

Exercise

  • (a)
    Use the pentagonal recurrence to compute p(15) from the table.
  • (b)
    How many partitions of 9 into distinct parts are there?
  • (c)
    How many partitions of 10 have largest part exactly 3?
Show solution

Answers: (a) p(15) = p(14) + p(13) − p(10) − p(8) + p(3) + p(0) = 135 + 101 − 42 − 22 + 3 + 1 = 176. (b) 8: 9, 8+1, 7+2, 6+3, 5+4, 6+2+1, 5+3+1, 4+3+2. (c) By conjugation this equals p₃(10) = 8.

V.3.1