--- from: http://rosettacode.org/wiki/Combinations_with_repetitions note: Discrete math