Computing $\lim\limits_{n\to\infty} \Big(\sum\limits_{i = 1}^n \sum\limits_{j = 1}^n \frac1{i^2+j^2}-\frac{\pi}{2} \log(n)\Big)$. In the chatroom we discussed about the asymptotic of $\displaystyle \sum_{i = 1}^n \sum_{j = 1}^n \frac1{i^2+j^2}$, and if we think of the inverse tangent integral, it's easy to see that $\displaystyle \sum_{i = 1}^n \sum_{j = 1}^n \frac1{i^2+j^2}\approx \operatorname{Ti}_2(n)\approx \frac{\pi}{2} \log(n)$ where I used
the well-known relation $\displaystyle \operatorname{Ti}_2(x)-\operatorname{Ti}_2(1/x)=\frac{\pi}{2}\operatorname{sgn}(x) \log|x|$. At this point, @robjohn posed the following  limit
$$\lim_{n\to\infty} \left(\displaystyle \sum_{i = 1}^n \sum_{j = 1}^n \frac1{i^2+j^2}-\frac{\pi}{2} \log(n)\right)$$
that looks like a pretty tough limit. Using $\coth(z)$ one can see the limit is approximately $-\dfrac{\pi^2}{12}$,
but how about finding a way to precisely compute the limit? 

Here is the beginning of an asymptotic expansion. First note that
$$
\begin{align}
\arctan\left(\frac kn\right)-\arctan\left(\frac {k-1}n\right)
&=\arctan\left(\frac{\frac1n}{1+\frac kn\frac {k-1}n}\right)\\
&=\arctan\left(\frac{n}{n^2+k^2-k}\right)\tag{1}
\end{align}
$$
Then
$$
\begin{align}\hspace{-1cm}
\sum_{k=1}^n\frac1{n^2+k^2}-\frac\pi{4n}
&=\sum_{k=1}^n\left[\frac1{n^2+k^2}-\frac1n\arctan\left(\frac{n}{n^2+k^2-k}\right)\right]\\
&=\sum_{k=1}^n\left[\frac1{n^2+k^2}-\frac1{n^2+k^2-k}+\frac{n^2}{3(n^2+k^2-k)^3}-\dots\right]\\
&=\sum_{k=1}^n\left[-\frac{k}{(n^2+k^2)(n^2+k^2-k)}+\frac{n^2}{3(n^2+k^2-k)^3}-\dots\right]\\
&\sim\int_0^1\left[-\frac1{n^2}\frac{x}{(1+x^2)^2}+\frac1{n^3}\frac1{3(1+x^2)^3}-\dots\right]\mathrm{d}x\\
&=-\frac1{4n^2}+O\left(\frac1{n^3}\right)\tag{2}
\end{align}
$$
Therefore,
$$
\sum_{k=1}^n\frac1{n^2+k^2}=\frac\pi{4n}-\frac1{4n^2}+O\left(\frac1{n^3}\right)\tag{3}
$$
By computing the edges of the square in index space, we get
$$
\begin{align}
\sum_{j,k=1}^n\frac1{j^2+k^2}-\sum_{j,k=1}^{n-1}\frac1{j^2+k^2}
&=2\sum_{k=1}^n\frac1{n^2+k^2}-\frac1{2n^2}\\
&=\frac\pi{2n}-\frac1{n^2}+O\left(\frac1{n^3}\right)\tag{4}
\end{align}
$$
The Euler-Maclaurin Sum Formula applied to $(4)$ gives
$$
\sum_{j,k=1}^n\frac1{j^2+k^2}=\frac\pi2\log(n)+C+\frac{\pi+4}{4n}+O\left(\frac1{n^2}\right)\tag{5}
$$
for some constant $C$.
Equation $(5)$ supports my comment that computationally, 
$$
\sum_{j,k=1}^n\frac1{j^2+k^2}-\frac\pi2\log(n)\sim C+\frac{\pi+4}{4n}\tag{6}
$$
where $C\approx-0.82586118$ and $\frac{\pi+4}{4}\approx1.785398$.
