How many different arrangements among four random digits there occur 2 or 1 repetition. How many different arrangements among four random digits there occur 2 or 1 repetition? 
This is part from an exercise in Feller VI, pag 53. (second edition)
 A: We count (i) the number of $4$-digit sequences that are "four of a kind," like $5555$; (ii) The number that are three of a kind, like $1115$ and $1611$; (iii) the number that are have two pairs, like $1414$ or $4411$; (iv) the number with $1$ pair.
(i) This is easy, there are $10$ such strings. 
(ii) The digit we have $3$ of can be chosen in $10$ ways. For each way, the accompanying singleton can be chosen in $9$ ways. And for every way of doing this, we have $\binom{4}{1}$ ways to choose the location of the singleton, for a total of $(10)(9)\binom{4}{1}$.
(iii) We count the number of two pair hands. The digits we have two each of can be chosen in $\binom{10}{2}$ ways. For each such way, the locations of the higher ranking digits can be chosen in $\binom{4}{2}$ ways, for a total of $\binom{10}{2}\binom{4}{2}$.
(iv) Finally, we count the one pair pair hands. The digit used in the pair can be chosen in $10$ ways. Where it occurs in the string can be chosen in $\binom{4}{2}$ ways. And then the remaining slots can be filled in $(9)(8)$ ways, for a total of $(10)\binom{4}{2}(9)(8)$.  
