partition function

Tags: #definition

partition function

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

It has generating function

n0p(n)xn=i111xi

proof here

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

p(n)=k=±1,±2,(1)k1p(nk(3k1)2)

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

(n0p(n)xn)1=i1(1xi)=kZ(1)kxk(3k1)/2

Note that k(3k1)2 are the pentagonal numbers

Variants

The generating function for partitions with distinct parts is given by

n0pdist(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