Combinatorics of tickets (same number as many as three times.) Here's the question I'm trying to solve:

In a lottery game, players choose 6 numbers between 1 and 24. Suppose players may choose the same number as many as three times. such as $\{2,2,5,20,22,23\}$ and $\{7,7,7,10,10,19\}$, How many tickets are possible?

I'm trying to consider the following cases:

*

*6 distinct numbers: $\binom {24}6$

*1 pair and 4 distinct numbers: $\binom {24}1\times \binom {23}4$

*2 pairs and 2 distinct numbers: $\binom {24}2\times \binom {22}2$

*3 pairs: $\binom {24}3$

*1 triplet, 3 distinct: $\binom {24}1\times \binom {23}3$

*1 triplet, 1 pair, 1 distinct: $\binom {24}1\times \binom {23}1\times \binom{22}1$

*2 triplets: $\binom {24}2$
I'm not pretty sure if my answer looks correct, and I'm especially confused at case 6: can I represent that as $\binom {24}2\times\binom {22}1$? Is there a better way to think about this question? Thanks for the help!
 A: Your working is correct. Specifically on case $6$ that you raised a question,
$1$ triple, $1$ pair and $1$ single: $ \displaystyle {24 \choose 1}{23 \choose 1} {22 \choose 1}$ is correct.
You could have also first chosen the $3$ numbers and then assign one as triple, one as pair and one as a single.
So it can be also be written as $\displaystyle {24 \choose 3} \cdot 3! \ $ or as $ \displaystyle {24 \choose 2} \cdot 2! \cdot {22 \choose 1}$
Another approach to do this is to use generating function, if you are familiar with it.
Each number can be selected $0 - 3$ times and there are $24$ numbers so generating function is,
$(1+x+x^2+x^3)^{24}$
Now we look for coefficient of $x^6$ in it as each ticket has $6$ numbers and that is $467820$. Your answer matches.
A: If you have not studied generating functions, I would suggest using stars and bars. The problem is equivalent to putting $6$ identical balls into $24$ distinct bins, minus cases with any one bin violating constraint by having $4$ or more balls, thus
$\dbinom{6+24-1}{24-1} - \dbinom{24}{1}\dbinom{2+24-1}{24-1} =\boxed {467 820}$
