> I want to divide n objects in k classes and need an output with all > (n+1)(n+2)/2 possibilities. That's the "set of compositions". You may use the partitions package and proceed from there (provided the brute-force method suggested by Gabor is not viable').