Calculate $\lim_{N\to+\infty}\left(\sum_{n=1}^N \frac{1}{n^2}-\frac{\pi^2}{6}\right)N$ How to calculate the limit
$$\lim_{N\to+\infty}\left(\sum_{n=1}^N \frac{1}{n^2}-\frac{\pi^2}{6}\right)N?$$
By using the numerical method with Python, I guess the right answer is $-1$ but how to prove? I have no idea.

 A: Let $N\geq 1$. Note that
$$
\frac{{\pi ^2 }}{6} - \sum\limits_{n = 1}^N {\frac{1}{{n^2 }}}  = \sum\limits_{n = N + 1}^\infty  {\frac{1}{{n^2 }}}  = \sum\limits_{n = N + 1}^\infty  {\frac{1}{{n(n - 1)}}}  - \sum\limits_{n = N + 1}^\infty  {\frac{1}{{n^2 (n - 1)}}}  = \frac{1}{N} - \sum\limits_{n = N + 1}^\infty  {\frac{1}{{n^2 (n - 1)}}} .
$$
Then
$$
\sum\limits_{n = N + 1}^\infty  {\frac{1}{{n^2 (n - 1)}}}  \le \sum\limits_{n = N}^\infty  {\frac{1}{{n^3 }}}  \le \frac{1}{{N^{3/2} }}\sum\limits_{n = N}^\infty  {\frac{1}{{n^{3/2} }}}  \le \frac{{\zeta (3/2)}}{{N^{3/2} }}.
$$
Accordingly,
$$
\left( {\sum\limits_{n = 1}^N {\frac{1}{{n^2 }}}  - \frac{{\pi ^2 }}{6}} \right)N =  - 1 + \mathcal{O}\!\left( {\frac{1}{{N^{1/2} }}} \right),
$$
showing that the limit is indeed $-1$.
A: Following up on the suggestion of Paramanand Singh in the comments let $a_N =\sum_{n=1}^{N}\frac{1}{n^2}-\frac{\pi^2}{6}$ and $b_N=\frac{1}{N}$  Then $a_N \to 0$ and $b_N\to 0$ as $N \to \infty$ with $\{b_N\}$ strictly decreasing.  We need to show $$
\lim _{N\to \infty}\frac{a_{N+1}-a_N}{b_{N+1}-b_N}= -1
$$
to deduce the lmit by applying the Cesaro-Stolz theorem, but $$
\begin{align}
\frac{\frac{1}{(N+1)^2}}{\frac{1}{N+1}-\frac{1}{N}} &= \frac{\frac{1}{(N+1)^2}}{-\frac{1}{N(N+1)}}\\
\\
&= \frac{-N}{N+1}\to -1 \text{ as }N \to \infty
\end{align}
$$
Then by the Cesaro-Stolz theorem $\lim_{N\to\infty}\frac{a_N}{b_N}=-1$
A: Just for your curiosity
Making the problem more general
$$S_N^{(k)}=N^{k-1} \Bigg[\sum_{n=1}^N \frac 1{n^k}-\sum_{n=1}^\infty \frac 1{n^k} \Bigg]=N^{k-1} \bigg[H_N^{(k)}-\zeta (k)\bigg]$$ Using the asymptotics of the generalized harmonic numbers
$$H_N^{(k)}=N^{-k} \left(\frac{N}{1-k}+\frac{1}{2}-\frac{k}{12 N}+O\left(\frac{1}{N^3}\right)\right)+\zeta (k)$$
$$S_N^{(k)}=\frac{1}{1-k}+\frac{1}{2 N}-\frac{k}{12 N^2}+O\left(\frac{1}{N^4}\right)$$ which explains that for any $k$ you need to compute a lot of terms (just as you experienced).
A: Let $\epsilon>0$, there is a large enough $N$ such that
$$\frac{1-\epsilon}{(N+m-1)(N+m)}<\frac1{(N+m)^2}<\frac1{(N+m)(N+m-1)}=\frac1{N+m-1}-\frac1{N+m}$$
for all $m\ge 0$.
Then we see that
$$(1 - \varepsilon )(\frac{1}{{N  - 1}} ) = (1 - \varepsilon )\sum\limits_m {(\frac{1}{{N + m - 1}} - \frac{1}{{N + m}})}  < \sum\limits_m {\frac{1}{{{{(N + m)}^2}}} < \sum\limits_m {(\frac{1}{{N + m - 1}} - \frac{1}{{N + m}})} }  = \frac{1}{{N  - 1}}.$$
Then we can see the result easily.
