There are 7 ways to partition the number 5 into the sum of positive integers:
5 = 1 + 4 = 1 + 1 + 3 = 2 + 3 = 1 + 2 + 2 = 1 + 1 + 1 + 2 = 1 + 1 + 1 + 1 + 1
Let's express this as p(5) = 7
. If you write down the number of ways to partition each number starting at 0 you get:
p(n) = 1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, ...
By convention, p(0) = 1