# How many ways are there to select five unordered elements from a set with three elements when repetition is allowed?

Am I doing this correctly?

$C(r+n-1,n-1) = C(5+3-1,2) = \frac{7\times6}{1\times2} = 21$

Thanks!

-
Yes.${}{}{}{}{}{}{}{}$ –  André Nicolas Mar 2 at 22:58
$\frac{(n+r-1)!}{r!(n-1)!}$
$\frac{(3+5-1)!}{5!(3-1)!} = \frac{7!}{5!2!} = \frac{7*6}{2*1} = 21$, so yes you are doing it right!