Combinations with repetition

Computes the number of ways to choose k elements among n, allowing repetitions.

combinations_with_repetition(Integer, Integer)

Given two integers n and k, returns the number of ways to choose k elements among n, allowing repetitions.

combinations_with_repetition(List | Vector, Integer)

Given a list or vector L and an integer k, returns a list with all the possible ways to choose k element among L, allowing repetition.