This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

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.