NextPartition

NextPartition[p]
gives the integer partition following p in reverse lexicographic order.

DetailsDetails