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.
Definition and examples 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 (e.g., 1 + 1 + 2 and 1 + 2 + 1) are not considered distinct. By convention p(0) = 1, as there is one way of representing 0 as a sum of positive integers (the empty sum). 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 p(100)=190,569,292p(1000)=24,061,467,864,032,622,473,692,149,727,991≈2.40615×1031p(10000)=36,167,251,325,…,906,916,435,144≈3.61673×10106
Generating function
The generating function for p(n) is given by ∑n=0∞p(n)xn=∏k=1∞(11−xk)=(1+x+x2+⋯)(1+x2+x4+⋯)(1+x3+x6+⋯)⋯=11−x−x2+x5+x7−x12−x15+x22+x26−⋯=1/∑k=−∞∞(−1)kxk(3k−1)/2.The equality between the products on the first and second lines of this formula is obtained by expanding each factor 1/(1−xk) into the geometric series (1+xk+x2k+x3k+⋯). To see that the expanded product equals the sum on the first line, apply the distributive law to the product. This expands the product into a sum of monomials of the form xa1x2a2x3a3⋯ for some sequence of coefficients ai, only finitely many of which can be non-zero. The exponent of the term is n=∑iai, and this sum can be interpreted as a representation of n as a partition into ai copies of each number i. Therefore, the number of terms of the product that have exponent n is exactly p(n), the same as the coefficient of xn in the sum on the left. Therefore, the sum equals the product. 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 in these lines are the pentagonal numbers Pk=k(3k−1)/2 for k∈{0,1,−1,2,−2,…} (generalized somewhat from the usual pentagonal numbers, which come from the same formula for the positive values of k). The pattern of positive and negative signs in the third line comes from the term (−1)k in the fourth line: even choices of k produce positive terms, and odd choices produce negative terms. More generally, the generating function for the partitions of n into numbers selected from a set A of positive integers can be found by taking only those terms in the first product for which k∈A. This result is due to Leonhard Euler. The formulation of Euler's generating function is a special case of a q-Pochhammer symbol and is similar to the product formulation of many modular forms, and specifically the Dedekind eta function.
Recurrence relations The same sequence of pentagonal numbers appears in a recurrence relation for the partition function: p(n)=∑k∈ℤ∖{0}(−1)k+1p(n−k(3k−1)/2)=p(n−1)+p(n−2)−p(n−5)−p(n−7)+p(n−12)+p(n−15)−p(n−22)−⋯ As base cases, p(0) is taken to equal 1, and p(k) is taken to be zero for negative k. Although the sum on the right side appears infinite, it has only finitely many nonzero terms, coming from the nonzero values of k in the range −24n+1−16≤k≤24n+1+16. The recurrence relation can also be written in the equivalent form p(n)=∑k=1∞(−1)k+1(p(n−k(3k−1)/2)+p(n−k(3k+1)/2)). Another recurrence relation for p(n) can be given in terms of the sum of divisors function σ: p(n)=1n∑k=0n−1σ(n−k)p(k). If q(n) denotes the number of partitions of n with no repeated parts then it follows by splitting each partition into its even parts and odd parts, and dividing the even parts by two, that p(n)=∑k=0⌊n/2⌋q(n−2k)p(k).
Congruences
… excerpt ends here. Continue reading the full article.


