How many times should I roll a die to get 4 different results? What is the expected value of the number $X$ of rolling a die until we obtain 4 different results (for example, $X=6$ in case of the event $(1,4,4,1,5,2)$)?
I'm not only interested in technical details of a solution---I can solve it to some extent, see below---but even more in the following:


*

*Is it a known problem, does it have a name?

*Does there exist a closed-form expression? (See below for a series expansion)

*Does there exist a feasible algorithm/formula to compute it if the die is not "fair" and each face has possibly a different probability?



My attempt:
$EX=\sum_{j=4}^\infty j\, P(X=j)$. Clearly, $P(X=j)$ is $1/6^j$ multiplied by the number of ways to obtain $X=j$. The number of ways is $6\choose 3$ (the choice of 3 elements that occur within the first $j-1$ rolls) multiplied by $3$ (the last roll) multiplied by the number of surjective functions from $j-1$ to 3 (the number of ways what can happen in the first $j-1$ rolls, if the three outputs are given). Further, the number of surjective functions can be expressed via Stirling numbers of the second kind: so in this way, I can get a series expression, although not a very nice one.

You do not need the probabilities to calculate the expected value of $X$.
The probability to get another number is $\frac{6}{6}$ , $\frac{5}{6}$ , $\frac{4}{6}$ and $\frac{3}{6}$ , if $0,1,2,3$ numbers have already appeared.
So, $E(X)=\frac{6}{6}+\frac{6}{5}+\frac{6}{4}+\frac{6}{3}=5.7$
So, with a $6$-sided dice, to get $4$ numbers, you need $5.7$ throws in the average.
If you throw until all numbers appear, you have the coupon-collector-problem.
You can calculate other values in an analogue way.
I assumed equal probabilities. If this is not the case, the solution is far more difficult.
