Example 4. How many different six-digit numbers can be written using the digits $1 ; 1 ; 1 ; 2 ; 2 ; 2$?
Solution. Here we need to find the number of permutations with repetitions, which is determined by formula (1.3.7). For $k=2, n_{1}=3, n_{2}=3, n=6$ this formula gives us

$$
P_{6}(3 ; 3)=\frac{6!}{3!\cdot 3!}=\frac{1 \cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot 6}{1 \cdot 2 \cdot 3 \cdot 1 \cdot 2 \cdot 3}=20
$$