27.13*. (Belgium, 82). On the inner wrapper of each chocolate bar in the "Great Mathematician" series, one of the $n$ outstanding mathematicians is depicted, and the portrait of each of them appears with equal probability, equal to $1 / n$. On average, how many chocolate bars need to be bought to collect the complete set of portraits?
27.13. Let's call a chocolate bar special if it features a portrait that has not been encountered before. Suppose among the purchased chocolate bars there are exactly $k$ different ones. Denote by $M_{k}$ the average number of chocolate bars that need to be bought after this, so that the last one turns out to be special. Then with probability $(n-k) / n$, the next chocolate bar will be special, and with probability $k / n$ a non-special chocolate bar will be bought, after which the average number of chocolate bars until the next special one is again $M_{k}$. According to Theorem 100, we get the equation

$$
M_{k}=\frac{n-k}{n} \cdot 1+\frac{k}{n}\left(1+M_{k}\right)
$$

from which $M_{k}=n /(n-k)$. Then, by Theorem 99, the average number of chocolate bars that need to be bought is

$$
\sum_{k=0}^{n-1} M_{k}=\sum_{k=0}^{n-1} \frac{n}{n-k}=n\left(1+\frac{1}{2}+\ldots+\frac{1}{n-1}+\frac{1}{n}\right)
$$

## APPLICATIONS

## Appendix A  COMMENTS ON PROBLEM CONDITIONS