Permutations with repetition

Computes the number of permutations with repetitions. That is, given a non-negative integer n and a sequence of one or more additional non-negative integers n subscript 1 comma... comma n subscript r such that n subscript 1 plus midline horizontal ellipsis plus n subscript r equals n, this functions returns the number of permutations for n elements taken from r different elements and such that the i-th element repeats n subscript i times.

permutations_with_repetition(Integer, Integer, ..., Integer)

Given an integer n and a set of integers n subscript 1 comma... comma n subscript r satisfying the conditions above, computes the number of permutations for n elements taken from r different elements and such that the i-th element repeats n subscript i times.

permutations_with_repetition(Integer, List | Vector)

Given an integer n and a list or vector of n elements, comprised of r different elements and such that the i-th element repeats n subscript i times, returns a list of all the different distinct permutations (in lexicographical order).