partitions function

Generate partitions of n items constrained into k non empty subsets