partition function

Tags: #definition

partition function

A partition function p(n) counts the number of integer partitions of n.

It has generating function

∑n≥0p(n)xn=∏i≥111−xi

proof here

and satisfies the recurrence relation (Euler's pentagonal number theorem):

p(n)=∑k=±1,±2,…(−1)k−1p(n−k(3k−1)2)

for n≥1. (note it is 0 for n<0 and p(0)=1). Equivalently,

(∑n≥0p(n)xn)−1=∏i≥1(1−xi)=∑k∈Z(−1)kxk(3k−1)/2

Note that k(3k−1)2 are the pentagonal numbers

Variants

The generating function for partitions with distinct parts is given by

∑n≥0pdist(n)xn=∏i=1∞(1+xi)

Properties

Examples

Here are the first couple values:

n p(n)
0 1
1 1
2 2
3 3
4 5
5 7
6 11
7 15
8 22