Series involving arctangent $$\sum_{n=1}^\infty \frac1n - \arctan(\frac1n)$$
Can this sum be calculated (it may involve Gamma or Beta function)?
Maybe both terms of the sum could be replaced by an integral. 
 A: Let's start with :
$$f(x):=\sum_{n=1}^\infty \frac xn - \arctan\left(\frac xn\right)$$
and evaluate first the derivative :
\begin{align}
f'(x)&=\sum_{n=1}^\infty \frac 1n - \frac n{n^2+x^2}\\
&=\sum_{n=1}^\infty \frac 1n - \frac12\left(\frac 1{n+ix}+\frac 1{n-ix}\right)\\
&=\frac 12(\psi(1+i x)+\psi(1-i x))+\gamma\\
&=\gamma+\Re\,\psi(i x)\\
&=\left(C+\gamma\,x+\Re\,(-i\,\log\Gamma(i x))\right)'\\
&=\left(C+\gamma\,x+\Im\,\log\Gamma(i x)\right)'\\
\end{align}
(using the expressions for the series from A&S p.$264$ and $265$ and for digamma $\psi(1\pm x)$ in A&S)
We obtain $f(x)=C+\gamma\,x+\Im\,\log\Gamma(i x)$  
with $f(0^+)=0$ and $\lim_{x\to 0^+}\Im\,\log\Gamma(i x)=-\dfrac {\pi}2$ so that $C=\dfrac {\pi}2$ and :
$$f(x)=\frac {\pi}2+\gamma\,x+\Im\,\log\Gamma(i x)$$
Your wished solution will thus be : 
$$\;f(1)=\frac {\pi}2+\gamma+\Im\,\log\Gamma(i)\approx 0.27557534443399966271898$$
A: Yes, consider the contour integral:
$$\oint_{C\left(R\right)}\frac{\Gamma'(z)}{\Gamma(z)}\left[\frac{1}{z}-\arctan\left(\frac{1}{z}\right)\right]dz$$
where $C\left(R\right)$ is a counterclockwise circle of radius R. In the limit of R to infinity the integral tends to zero, therefore the sum of the residues must be zero. 
