Secretary problem - Riemann integral

The part of the derivation in the article alluding to a Riemann sum is hand-waving.

For a rigorous approach, write the discrete sum as

$$\tag{1}\frac{r-1}{n}\sum_{i=r}^n \frac{1}{i-1} = \frac{r-1}{n}\sum_{i=r-1}^{n-1} \frac{1}{i} = \frac{r-1}{n}\left(\frac{1}{r-1}+\sum_{i=r}^{n-1} \frac{1}{i}\right)\\ = \frac{1}{n} + \frac{r-1}{n}\left(\sum_{i=1}^{n-1} \frac{1}{i} - \sum_{i=1}^{r-1} \frac{1}{i}\right) \\ = \frac{1}{n} + \frac{r-1}{n}\left(\sum_{i=1}^{n-1} \frac{1}{i} - \log(n-1)- \left(\sum_{i=1}^{r-1} \frac{1}{i}- \log(r-1)\right)\right) + \frac{r-1}{n}\log \frac{n-1}{r-1}$$

We will let both $r \to \infty$ and $n \to \infty$, with $\frac{r-1}{n}= x + \phi(n)$ where $x$ is fixed and $\phi(n) \to 0$. For example, taking $r = \lfloor 1+nx\rfloor$ we have $x - \frac{1}{n} < \frac{r-1}{n} \leqslant x$ and $\frac{r-1}{n} \to x$ as $n \to \infty$.

Substituting $x+ \phi(n)$ for $\frac{r-1}{n}$ on the RHS of (1), we get

$$\tag{2}\frac{r-1}{n}\sum_{i=r}^n \frac{1}{i-1} = \frac{1}{n} + (x+\phi(n))\left(\sum_{i=1}^{n-1} \frac{1}{i} - \log(n-1)- \left(\sum_{i=1}^{r-1} \frac{1}{i}- \log(r-1)\right)\right) + (x + \phi(n))\log \frac{1-1/n}{x+\phi(n)}$$

Using $\lim_{m \to \infty} \sum_{i=1}^m \frac{1}{i} - \log(m) = \gamma$, where $\gamma$ is the Euler-Mascheroni constant, and taking the limit of both sides of (2) as $n \to \infty$, it follows that

$$\lim_{n \to \infty}\frac{r-1}{n}\sum_{i=r}^n \frac{1}{i-1}= 0 + x(\gamma - \gamma) + x \log \frac{1}{x} = -x\log(x) = x \int_x^1 \frac{dt}{t}$$

Note that the integral is a large-$n$ approximation for the probability that the best applicant is selected from a pool of $n$ applicants when the first $x \cdot n$ applicants are rejected.