Maths WorkshopMaths problems with full solutions
Exercise 1309Combinatorics › Counting principlesOlympiadAdded 5 Nov 2026

Partitions into distinct parts and into odd parts

#generating functions#partitions#Euler

Statement

Prove that for every n≥1n\ge1, the number of partitions of nn into distinct positive parts equals the number of partitions of nn into odd parts.

For example, for n=6n=6: 6, 5+1, 4+2, 3+2+16,\ 5+1,\ 4+2,\ 3+2+1 against 5+1, 3+3, 3+1+1+1, 1+1+1+1+1+15+1,\ 3+3,\ 3+1+1+1,\ 1+1+1+1+1+1.

Hint

Write the generating function of each family as an infinite product. A partition into distinct parts uses each size kk zero or one time.

Show solutionHide solution

Solution

Idea. Compare two infinite products as formal power series.

Distinct parts. Choosing, for every k≥1k\ge1, whether kk appears (0 or 1 times) shows that
D(x)=∑n≥0dnxn=∏k≥1(1+xk),D(x)=\sum_{n\ge0}d_nx^n=\prod_{k\ge1}(1+x^k),
where dnd_n is the number of partitions of nn into distinct parts.

Odd parts. A part 2k−12k-1 can be used any number of times: it contributes the factor 11−x2k−1\dfrac1{1-x^{2k-1}}. So
O(x)=∑n≥0onxn=∏k≥111−x2k−1.O(x)=\sum_{n\ge0}o_nx^n=\prod_{k\ge1}\frac1{1-x^{2k-1}}.

Equality. Since 1+xk=1−x2k1−xk1+x^k=\dfrac{1-x^{2k}}{1-x^k},
D(x)=∏k≥11−x2k1−xk=∏k≥1(1−x2k)∏k≥1(1−xk).D(x)=\prod_{k\ge1}\frac{1-x^{2k}}{1-x^k}=\frac{\prod_{k\ge1}(1-x^{2k})}{\prod_{k\ge1}(1-x^{k})}.
The numerator contains exactly the factors of the denominator with even index, which cancel; what remains in the denominator is ∏k≥1(1−x2k−1)\prod_{k\ge1}(1-x^{2k-1}). Therefore D(x)=O(x)D(x)=O(x) and dn=ond_n=o_n.

Check. The values dn=ond_n=o_n for n=1,…,12n=1,\dots,12 are 1,1,2,2,3,4,5,6,8,10,12,151,1,2,2,3,4,5,6,8,10,12,15.

Lesson. Encode a counting problem as a product of simple series and compare the products algebraically.