One way of getting a handle on the partition function involves an intermediate function p(k,n) which represents the number of partitions of n using only natural numbers at least as large as k. For any given value of k, partitions counted by p(k,n) fit into exactly one of the following categories:
1. smallest addend is k
2. smallest addend is strictly greater than than k
The number of partitions meeting the first condition is p(k,n-k). To see this, imagine a list of all the partitions of the number n-k into numbers of size at least k, then imagine appending "+k" to each partition in the list. Now what is it a list of?
The number of partitions meeting the second condition is p(k+1,n) since a partition into parts of at least k which contains no parts of at exactly k must have all parts at least k+1.
An alternative computation of the partition function involves generating functions. Consider the infinite product
Expanding each term as a geometric series, we can rewrite it as
(1 + x + x2 + x3 + ...)(1 + x2 + x4 + x6 + ...)(1 + x3 + x6 + x9 + ...) ...
The xm term in this product counts the number of ways to write
n = a1 + 2a2 + 3a3 + ... = (1 + 1 + 1 + 1 + ...) + (2 + 2 + 2 + 2 + ...) + (3 + 3 + 3 ...) + ...,
where each number i appears ai times. This is precisely the definition of a partition of n, so our product is the desired generating function. More generally, the generating function for the partitions of n into numbers from a set A can be found by taking only those terms in the product where k is an element of A This result is due to Euler
The formulation of the generating function is similar to the product formulation of many modular forms, giving some idea of the connection between the two. It can also be used in conjunction with the pentagonal number theorem to derive a recurrence for the partition function stating that
p(k) − p(k− 1) − p(k − 2) + p(k − 5) + p(k − 7) - p(k − 12) − ... = 0,
where the sum is taken over all pentagonal numbers of the form ½n(3n − 1), including those where n < 0, and the terms continue to alternate +, +, -, -, +, +, ...
Some values of the partition function are as follows: