Show that this limit yields $\gamma=\lim_{n \to \infty}\sum_{k=1}^{n-1}\frac{1}{k}-\sum_{k= n}^{(n-1)^2}\frac{1}{k}$ $\gamma =0.5772156...$ is Euler's constant
Show that this limit yields
$$\gamma=\lim_{n \to \infty}\sum_{k=1}^{n-1}\frac{1}{k}-\sum_{k=n}^{(n-1)^2}\frac{1}{k}$$
 A: Since
$$\frac{1}{k} \leqslant \int_{k-1}^k \frac{dx}{x} = \log k - \log(k-1) \leqslant \frac{1}{k-1},$$
it follows that
$$\sum_{k = n}^{(n-1)^2}\frac{1}{k} \leqslant \log(n-1)^2 - \log(n-1) = \log(n-1) \leqslant \sum_{k = n}^{(n-1)^2}\frac{1}{k} + \frac{1}{n-1} - \frac{1}{(n-1)^2},$$
and
$$ \sum_{k = 1}^{n-1}\frac{1}{k} - \log(n-1) + \frac{1}{n-1} - \frac{1}{(n-1)^2}\leqslant \sum_{k = 1}^{n-1}\frac{1}{k} - \sum_{k = n}^{(n-1)^2}\frac{1}{k} \leqslant \sum_{k = 1}^{n-1}\frac{1}{k} - \log(n-1).$$
By the squeeze theorem
$$\lim_{n \to \infty}\left(\sum_{k=1}^{n-1}\frac{1}{k}-\sum_{k= n}^{(n-1)^2}\frac{1}{k}\right) = \lim_{n \to \infty}\left(\sum_{k=1}^{n-1}\frac{1}{k} - \log(n-1)\right) = \gamma$$
A: There is a solution using harmonic numbers.
$$S_1=\sum_{k=1}^{n-1}\frac{1}{k}=H_{n-1}$$ $$S_2=\sum_{k= n}^{(n-1)^2}\frac{1}{k}=H_{(n-1)^2}-H_{n-1}$$ This makes $$S=\sum_{k=1}^{n-1}\frac{1}{k}-\sum_{k= n}^{(n-1)^2}\frac{1}{k}=S_1-S_2=2 H_{n-1}-H_{(n-1)^2}$$ Now, using the asymptotics given in the Wikipedia page, we then have $$S=\gamma +\frac{1}{n}+\frac{1}{3 n^2}+O\left(\frac{1}{n^3}\right)$$ which shows the limit and how it is approached.
For illustration purposes, I give below, for a few small values of $n$, the exact value as well as the approximation given above and their difference
$$\left(
\begin{array}{cccc}
n &  exact & approx & diff \\
 5 & 0.785938 & 0.790549 & -0.004611 \\
 6 & 0.750708 & 0.753142 & -0.002433 \\
 7 & 0.725441 & 0.726876 & -0.001435 \\
 8 & 0.706509 & 0.707424 & -0.000915 \\
 9 & 0.691823 & 0.692442 & -0.000619 \\
 10 & 0.680112 & 0.680549 & -0.000437
\end{array}
\right)$$
