Combinatorica`
Combinatorica`

Partitions

Partitions[n]

constructs all partitions of integer n in reverse lexicographic order.

Partitions[n,k]

constructs all partitions of the integer n with maximum part at most k, in reverse lexicographic order.

Details and Options