NextComposition

NextComposition[l]
constructs the integer composition that follows l in a canonical order.

DetailsDetails