17. The Capricious Princess (recommended for 9th grade, 4 points). A capricious princess is choosing a groom. 100 grooms are courting her, each better than the last, and there are no two equal among them. However, they court her in a random order. We will call a groom prominent if he pleases the princess more than all those who have courted her before. The first groom in line is also prominent, since there was no one before him.

We will say that a prominent groom and all subsequent ones who court after him but before the next prominent one (if there is one) form a chain of grooms. Find the expected number of grooms in the first chain.
Solution. Let's introduce indicators $I_{k}$ of the events "the $k$-th groom belongs to the first chain." This event is equivalent to the event "the 1st groom is the best among the first $k$ grooms." If this event occurs, then $I_{k}=1$, and if not, then $I_{k}=0$. Then the length of the first chain $X$ is equal to the sum of all indicators: $X=I_{1}+I_{2}+\ldots+I_{n}$.

The first groom belongs to the chain, so $I_{1}=1$. The first is better than the second with probability $\frac{1}{2}$. Therefore, $\mathrm{E} I_{2}=\mathrm{P}\left(I_{2}=1\right)=\frac{1}{2}$. The first groom is the best among the first three with probability $\frac{1}{3}$, so $\mathrm{E} I_{3}=\mathrm{P}\left(I_{3}=1\right)=\frac{1}{3}$. And so on: $\mathrm{E} I_{k}=\frac{1}{k}$.

From the equality

$$
X=I_{1}+I_{2}+\ldots+I_{n}
$$

transitioning to the expected value, we get:

$$
\mathrm{E} X=1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{n}
$$

This number is called the $n$-th harmonic number and is denoted by $H_{n}$. For $n=100$, the exact calculation gives $H_{100}=5.187 \ldots$

Comment. It is known that $\lim _{n \rightarrow \infty}\left(H_{n}-\ln n\right)=\gamma=0.5772 \ldots$ The number $\gamma$ is called the Euler-Mascheroni constant. Therefore, for sufficiently large $n$, we can consider that

$$
H_{n} \approx \ln n+0.577 .
$$

For $n=100$, the calculation using this formula gives $H_{100} \approx 5.182$.

Answer: $H_{100}=5.187 \ldots$