chickadee » math » partitions

partitions nprocedure
n
integer

Returns the number of partitions of n, which must be nonnegative. A partition of a positive integer n is a way of writing n as a sum of positive integers. The number 3 has the partitions (+ 1 1 1), (+ 1 2) and (+ 3).

> (partitions 3)
3
> (partitions 4)
5

Wikipedia: Partition