In number theory, the partition function represents the number of possible partitions of a non-negative integer . For instance, because the integer 4 has the five partitions,,,, and .
No closed-form expression for the partition function is known, but it has both asymptotic expansions that accurately approximate it and recurrence relations by which it can be calculated exactly. It grows as an exponential function of the square root of its argument. The multiplicative inverse of its generating function is the Euler function; by Euler's pentagonal number theorem this function is an alternating sum of pentagonal number powers of its argument.
Srinivasa Ramanujan first discovered that the partition function has nontrivial patterns in modular arithmetic, now known as Ramanujan's congruences. For instance, whenever the decimal representation of ends in the digit 4 or 9, the number of partitions of will be divisible by 5.
For a positive integer, is the number of distinct ways of representing as a sum of positive integers. For the purposes of this definition, the order of the terms in the sum is irrelevant: two sums with the same terms in a different order are not considered to be distinct.
By convention, as there is one way (the empty sum) of representing zero as a sum of positive integers. Furthermore when is negative.
The first few values of the partition function, starting with, are:
Some exact values of for larger values of include:
See main article: Pentagonal number theorem. The generating function for p(n) is given byThe equality between the products on the first and second lines of this formulais obtained by expanding each factor
1/(1-xk)
(1+xk+x2k+x3k+ … ).
a1 | |
x |
2a2 | |
x |
3a3 | |
x |
…
ai
n
ai
i
n
p(n)
xn
The function that appears in the denominator in the third and fourth lines of the formula is the Euler function. The equality between the product on the first line and the formulas in the third and fourth lines is Euler's pentagonal number theorem.The exponents of
x
Pk=k(3k-1)/2
k\in\{0,1,-1,2,-2,...\}
(-1)k
k
More generally, the generating function for the partitions of
n
A
k\inA
q
The same sequence of pentagonal numbers appears in a recurrence relation for the partition function:As base cases,
p(0)
1
p(k)
k
k
Another recurrence relation for
p(n)
q(n)
n
See main article: Ramanujan's congruences. Srinivasa Ramanujan is credited with discovering that the partition function has nontrivial patterns in modular arithmetic.For instance the number of partitions is divisible by five whenever the decimal representation of
n
(x)infty
Ramanujan also discovered congruences modulo 7 and 11:The first one comes from Ramanujan's identity
Since 5, 7, and 11 are consecutive primes, one might think that there would be an analogous congruence for the next prime 13,
p(13k+a)\equiv0\pmod{13}
p(bk+a)\equiv0\pmod{b}
p
cbk+a
c>1
proved that there are such congruences for every prime modulus greater than 3. Later, showed there are partition congruences modulo every integer coprime to 6.
Approximation formulas exist that are faster to calculate than the exact formula given above.
An asymptotic expression for p(n) is given by
p(n)\sim
1 | |
4n\sqrt3 |
\exp\left({\pi\sqrt{
2n | |
3 |
n\toinfty
p(1000)
2.4402 x 1031
Hardy and Ramanujan obtained an asymptotic expansion with this approximation as the first term:whereHere, the notation
(m,k)=1
m
k
s(m,k)
The error after
v
v
\sqrtn
p(200)
v=5
In 1937, Hans Rademacher was able to improve on Hardy and Ramanujan's results by providing a convergent series expression for
p(n)
The proof of Rademacher's formula involves Ford circles, Farey sequences, modular symmetry and the Dedekind eta function.
It may be shown that the
k
p(n)
Techniques for implementing the Hardy–Ramanujan–Rademacher formula efficiently on a computer are discussed by, who shows that
p(n)
O(n1/2+\varepsilon)
\varepsilon>0
p(1020)
A partition in which no part occurs more than once is called strict, or is said to be a partition into distinct parts. The function q(n) gives the number of these strict partitions of the given sum n. For example, q(3) = 2 because the partitions 3 and 1 + 2 are strict, while the third partition 1 + 1 + 1 of 3 has repeated parts. The number q(n) is also equal to the number of partitions of n in which only odd summands are permitted.[1]
n | q(n) | Strict partitions | Partitions with only odd parts | |
---|---|---|---|---|
0 | 1 | empty partition | empty partition | |
1 | 1 | 1 | 1 | |
2 | 1 | 2 | 1+1 | |
3 | 2 | 1+2, 3 | 1+1+1, 3 | |
4 | 2 | 1+3, 4 | 1+1+1+1, 1+3 | |
5 | 3 | 2+3, 1+4, 5 | 1+1+1+1+1, 1+1+3, 5 | |
6 | 4 | 1+2+3, 2+4, 1+5, 6 | 1+1+1+1+1+1, 1+1+1+3, 3+3, 1+5 | |
7 | 5 | 1+2+4, 3+4, 2+5, 1+6, 7 | 1+1+1+1+1+1+1, 1+1+1+1+3, 1+3+3, 1+1+5, 7 | |
8 | 6 | 1+3+4, 1+2+5, 3+5, 2+6, 1+7, 8 | 1+1+1+1+1+1+1+1, 1+1+1+1+1+3, 1+1+3+3, 1+1+1+5, 3+5, 1+7 | |
9 | 8 | 2+3+4, 1+3+5, 4+5, 1+2+6, 3+6, 2+7, 1+8, 9 | 1+1+1+1+1+1+1+1+1, 1+1+1+1+1+1+3, 1+1+1+3+3, 3+3+3, 1+1+1+1+5, 1+3+5, 1+1+7, 9 |
The generating function for the numbers q(n) is given by a simple infinite product:[2] where the notation
(a;b)infty
(a;b)infty=
infty | |
\prod | |
k=0 |
(1-abk).
Following identity is valid for the Pochhammer products:
-1 | |
(x;x) | |
infty |
=(x2;x
-1 | |
infty |
-1 | |
(x;x | |
infty |
From this identity follows that formula:
infty | |
l[\sum | |
n=0 |
p(n)xnr]=
infty | |
l[\sum | |
n=0 |
p(n)x2n
infty | |
r]l[\sum | |
n=0 |
q(n)xnr]
Therefore those two formulas are valid for the synthesis of the number sequence p(n):
p(2n)=
n | |
\sum | |
k=0 |
p(n-k)q(2k)
p(2n+1)=
n | |
\sum | |
k=0 |
p(n-k)q(2k+1)
In the following, two examples are accurately executed:
p(8)=
4 | |
\sum | |
k=0 |
p(4-k)q(2k)=
=p(4)q(0)+p(3)q(2)+p(2)q(4)+p(1)q(6)+p(0)q(8)=
=5 x 1+3 x 1+2 x 2+1 x 4+1 x 6=22
p(9)=
4 | |
\sum | |
k=0 |
p(4-k)q(2k+1)=
=p(4)q(1)+p(3)q(3)+p(2)q(5)+p(1)q(7)+p(0)q(9)=
=5 x 1+3 x 2+2 x 3+1 x 5+1 x 8=30
More generally, it is possible to consider partitions restricted to only elements of a subset A of the natural numbers (for example a restriction on the maximum value of the parts), or with a restriction on the number of parts or the maximum difference between parts. Each particular restriction gives rise to an associated partition function with specific properties. Some common examples are given below.
Two important examples are the partitions restricted to only odd integer parts or only even integer parts, with the corresponding partition functions often denoted
po(n)
pe(n)
A theorem from Euler shows that the number of strict partitions is equal to the number of partitions with only odd parts: for all n,
q(n)=po(n)
If we denote
p(N,M,n)
p(N,M,n)
infty | |
\sum | |
n=0 |
p(N,M,n)qn={N+M\choose
M} | ||||
|
Some general results on the asymptotic properties of restricted partition functions are known. If pA(n) is the partition function of partitions restricted to only elements of a subset A of the natural numbers, then:
If A possesses positive natural density α then
logpA(n)\simC\sqrt{\alphan}
C=\pi\sqrt
23 | |
and conversely if this asymptotic property holds for pA(n) then A has natural density α. This result was stated, with a sketch of proof, by Erdős in 1942.
If A is a finite set, this analysis does not apply (the density of a finite set is zero). If A has k elements whose greatest common divisor is 1, then
pA(n)=\left(\prodaa-1\right) ⋅
nk-1 | |
(k-1)! |
+O(nk-2).