We create a random sequence using the digits $0, 1, 2$. For sequences of what length will the probability be at least $61 \%$ that all three digits appear in the sequence?
Solution. The number of sequences of length $n$ using a single digit is 3, and the number of sequences using exactly two different digits is $\binom{3}{2}\left(2^{n}-2\right)$; thus,

$$
p_{n}=\frac{3+3\left(2^{n}-2\right)}{3^{n}}=\frac{2^{n}-1}{3^{n-1}}
$$

is the probability that in a sequence of length $n$, at least one digit does not appear. The

$$
p_{n}-p_{n+1}=\frac{2^{n}-1}{3^{n-1}}-\frac{2^{n+1}-1}{3^{n}}=\frac{3 \cdot 2^{n}-3-2^{n+1}+1}{3^{n}}=\frac{2^{n}-2}{3^{n}} \geq 0
$$

relation shows that the sequence of probabilities $p_{n}$ is monotonically decreasing. Since

$$
p_{4}=\frac{5}{9}>\frac{39}{100}>\frac{31}{81}=p_{5}
$$

the requirement of the problem is satisfied for sequences of length at least 5.