How it is calculated
Zero has one empty partition, so p(0) = 1. The parts themselves are not listed, only how many there are.
p(n) by the pentagonal-number theorem
Where the numbers come from
- Number
Example
p(5) = 7. They are 5, 4+1, 3+2, 3+1+1, 2+2+1, 2+1+1+1, and 1+1+1+1+1.
Questions
Are 3+1 and 1+3 two partitions?
No, one of them. Order does not matter.
How is it different from combinations?
Here the sum equals n, and the number of terms is not fixed ahead of time.
Why is the ceiling 200?
After that the number of partitions grows quickly. For a household calculator this range is enough.