# Permutations with repetition

Computes the number of permutations with repetitions. That is, given a non-negative integer and a sequence of one or more additional non-negative integers such that , this functions returns the number of permutations for elements taken from different elements and such that the -th element repeats times.

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

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

#### permutations_with_repetition(Integer, List | Vector)

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