In number theory, the partition function p(n) represents the number of possible partitions of a non-negative integer n. For instance, p(4) = 5 because the integer 4 has the five partitions 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 3, 2 + 2, and 4.
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 n ends in the digit 4 or 9, the number of partitions of n will be divisible by 5.
For a positive integer n, p(n) is the number of distinct ways of representing n 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 p(0) = 1, as there is one way (the empty sum) of representing zero as a sum of positive integers. Furthermore p(n) = 0 when n is negative.
The first few values of the partition function, starting with p(0) = 1, are:
Some exact values of p(n) for larger values of n include: [1]
As of June 2022 [update], the largest known prime number among the values of p(n) is p(1289844341), with 40,000 decimal digits. [2] [3] Until March 2022, this was also the largest prime that has been proved using elliptic curve primality proving. [4]
The generating function for p(n) is given by [5]
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 in these lines are the pentagonal numbers for (generalized somewhat from the usual pentagonal numbers, which come from the same formula for the positive values of ). The pattern of positive and negative signs in the third line comes from the term in the fourth line: even choices of produce positive terms, and odd choices produce negative terms.
More generally, the generating function for the partitions of into numbers selected from a set of positive integers can be found by taking only those terms in the first product for which . This result is due to Leonhard Euler. [6] The formulation of Euler's generating function is a special case of a -Pochhammer symbol and is similar to the product formulation of many modular forms, and specifically the Dedekind eta function.
The same sequence of pentagonal numbers appears in a recurrence relation for the partition function: [7]
Another recurrence relation for can be given in terms of the sum of divisors function σ: [8]
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 ends in the digit 4 or 9, as expressed by the congruence [10]
Ramanujan also discovered congruences modulo 7 and 11: [10]
Since 5, 7, and 11 are consecutive primes, one might think that there would be an analogous congruence for the next prime 13, for some a. However, there is no congruence of the form for any prime b other than 5, 7, or 11. [13] Instead, to obtain a congruence, the argument of should take the form for some . In the 1960s, A. O. L. Atkin of the University of Illinois at Chicago discovered additional congruences of this form for small prime moduli. For example:
Ken Ono ( 2000) proved that there are such congruences for every prime modulus greater than 3. Later, Ahlgren & Ono (2001) showed there are partition congruences modulo every integer coprime to 6. [14] [15]
Approximation formulas exist that are faster to calculate than the exact formula given above.
An asymptotic expression for p(n) is given by
This asymptotic formula was first obtained by G. H. Hardy and Ramanujan in 1918 and independently by J. V. Uspensky in 1920. Considering , the asymptotic formula gives about , reasonably close to the exact answer given above (1.415% larger than the true value).
Hardy and Ramanujan obtained an asymptotic expansion with this approximation as the first term: [16]
The error after terms is of the order of the next term, and may be taken to be of the order of . As an example, Hardy and Ramanujan showed that is the nearest integer to the sum of the first terms of the series. [16]
In 1937, Hans Rademacher was able to improve on Hardy and Ramanujan's results by providing a convergent series expression for . It is [17] [18]
The proof of Rademacher's formula involves Ford circles, Farey sequences, modular symmetry and the Dedekind eta function.
It may be shown that the th term of Rademacher's series is of the order
Techniques for implementing the Hardy–Ramanujan–Rademacher formula efficiently on a computer are discussed by Johansson (2012), who shows that can be computed in time for any . This is near-optimal in that it matches the number of digits of the result. [21] The largest value of the partition function computed exactly is , which has slightly more than 11 billion digits. [22]
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. [23]
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: [24]
Following identity is valid for the Pochhammer products:
From this identity follows that formula:
Therefore those two formulas are valid for the synthesis of the number sequence p(n):
In the following, two examples are accurately executed:
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 and .
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, . This is generalized as Glaisher's theorem, which states that the number of partitions with no more than d-1 repetitions of any part is equal to the number of partitions with no part divisible by d.
If we denote the number of partitions of n in at most M parts, with each part smaller or equal to N, then the generating function of is the following Gaussian binomial coefficient:
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 , with
and conversely if this asymptotic property holds for pA(n) then A has natural density α. [25] This result was stated, with a sketch of proof, by Erdős in 1942. [19] [26]
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 [27]
In number theory, the partition function p(n) represents the number of possible partitions of a non-negative integer n. For instance, p(4) = 5 because the integer 4 has the five partitions 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 3, 2 + 2, and 4.
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 n ends in the digit 4 or 9, the number of partitions of n will be divisible by 5.
For a positive integer n, p(n) is the number of distinct ways of representing n 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 p(0) = 1, as there is one way (the empty sum) of representing zero as a sum of positive integers. Furthermore p(n) = 0 when n is negative.
The first few values of the partition function, starting with p(0) = 1, are:
Some exact values of p(n) for larger values of n include: [1]
As of June 2022 [update], the largest known prime number among the values of p(n) is p(1289844341), with 40,000 decimal digits. [2] [3] Until March 2022, this was also the largest prime that has been proved using elliptic curve primality proving. [4]
The generating function for p(n) is given by [5]
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 in these lines are the pentagonal numbers for (generalized somewhat from the usual pentagonal numbers, which come from the same formula for the positive values of ). The pattern of positive and negative signs in the third line comes from the term in the fourth line: even choices of produce positive terms, and odd choices produce negative terms.
More generally, the generating function for the partitions of into numbers selected from a set of positive integers can be found by taking only those terms in the first product for which . This result is due to Leonhard Euler. [6] The formulation of Euler's generating function is a special case of a -Pochhammer symbol and is similar to the product formulation of many modular forms, and specifically the Dedekind eta function.
The same sequence of pentagonal numbers appears in a recurrence relation for the partition function: [7]
Another recurrence relation for can be given in terms of the sum of divisors function σ: [8]
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 ends in the digit 4 or 9, as expressed by the congruence [10]
Ramanujan also discovered congruences modulo 7 and 11: [10]
Since 5, 7, and 11 are consecutive primes, one might think that there would be an analogous congruence for the next prime 13, for some a. However, there is no congruence of the form for any prime b other than 5, 7, or 11. [13] Instead, to obtain a congruence, the argument of should take the form for some . In the 1960s, A. O. L. Atkin of the University of Illinois at Chicago discovered additional congruences of this form for small prime moduli. For example:
Ken Ono ( 2000) proved that there are such congruences for every prime modulus greater than 3. Later, Ahlgren & Ono (2001) showed there are partition congruences modulo every integer coprime to 6. [14] [15]
Approximation formulas exist that are faster to calculate than the exact formula given above.
An asymptotic expression for p(n) is given by
This asymptotic formula was first obtained by G. H. Hardy and Ramanujan in 1918 and independently by J. V. Uspensky in 1920. Considering , the asymptotic formula gives about , reasonably close to the exact answer given above (1.415% larger than the true value).
Hardy and Ramanujan obtained an asymptotic expansion with this approximation as the first term: [16]
The error after terms is of the order of the next term, and may be taken to be of the order of . As an example, Hardy and Ramanujan showed that is the nearest integer to the sum of the first terms of the series. [16]
In 1937, Hans Rademacher was able to improve on Hardy and Ramanujan's results by providing a convergent series expression for . It is [17] [18]
The proof of Rademacher's formula involves Ford circles, Farey sequences, modular symmetry and the Dedekind eta function.
It may be shown that the th term of Rademacher's series is of the order
Techniques for implementing the Hardy–Ramanujan–Rademacher formula efficiently on a computer are discussed by Johansson (2012), who shows that can be computed in time for any . This is near-optimal in that it matches the number of digits of the result. [21] The largest value of the partition function computed exactly is , which has slightly more than 11 billion digits. [22]
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. [23]
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: [24]
Following identity is valid for the Pochhammer products:
From this identity follows that formula:
Therefore those two formulas are valid for the synthesis of the number sequence p(n):
In the following, two examples are accurately executed:
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 and .
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, . This is generalized as Glaisher's theorem, which states that the number of partitions with no more than d-1 repetitions of any part is equal to the number of partitions with no part divisible by d.
If we denote the number of partitions of n in at most M parts, with each part smaller or equal to N, then the generating function of is the following Gaussian binomial coefficient:
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 , with
and conversely if this asymptotic property holds for pA(n) then A has natural density α. [25] This result was stated, with a sketch of proof, by Erdős in 1942. [19] [26]
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 [27]