Evaluation of $\sum\limits_{n=0}^\infty \left(\operatorname{Si}(n)-\frac{\pi}{2}\right)$? I would like to evaluate the sum
$$
\sum\limits_{n=0}^\infty \left(\operatorname{Si}(n)-\frac{\pi}{2}\right)
$$
Where $\operatorname{Si}$ is the sine integral, defined as:
$$\operatorname{Si}(x) := \int_0^x \frac{\sin t}{t}\, dt$$
I found that the sum could be also written as
$$
-\sum\limits_{n=0}^\infty \int_n^\infty \frac{\sin t}{t}\, dt
$$
Anyone have any ideas?
 A: There is this.  If
$$
S(x) = \sum_{n=0}^\infty \left(\mathrm{Si}(n x)-\frac{\pi}{2}\right)
$$
then differentiate term-by-term and sum to get
$$
S'(x) = \frac{1}{2x} \cot\frac{x}{2}
$$
However, we cannot just write
$$
S(1) = -\int_1^\infty \frac{1}{2x} \cot\frac{x}{2}\,dx
$$
for our answer, because that integrand has lots of poles in the interval $[1,\infty)$.
A: Numerical value 
First, let's establish the numerical value of the sum. Since $$\operatorname{Si}(n) - \frac{\pi}{2} = -\frac{\cos(n)}{n} \left(1 + \mathfrak{o}(n^{-2})\right) - \frac{\sin(n)}{n^2} \left(1 + \mathfrak{o}(n^{-2})\right)$$
we shall evaluate:
$$
    \sum_{n=0}^\infty \left(\operatorname{Si}(n) - \frac{\pi}{2}\right) = -\frac{\pi}{2} + \sum_{n=0}^\infty \left(\operatorname{Si}(n) - \frac{\pi}{2} + \frac{\cos(n)}{n}\right) - \sum_{n=1}^\infty \frac{\cos(n)}{n} \tag{1}
$$
The middle sum now converges unconditionally. The conditionally convergent sum is easy to evaluate in closed form:
$$
   -\sum_{n=1}^\infty \frac{\cos(n)}{n} = -\Re \left(\sum_{n=1}^\infty \frac{\mathrm{e}^{i n}}{n} \right) = \Re\left( \log\left(1-\mathrm{e}^i \right) \right) = \log\left(2 \sin \left(\frac{1}{2}\right)\right)
$$
The following image displays the partial sums of $(1)$: 
  
Thus the numerical value of the sum is approximately $-1.869201$.
Mellin-Barnes representation 
Using the Mellin-Barnes representation for the summand:
$$
    \operatorname{Si}(n) - \frac{\pi}{2} = -\frac{\sqrt{\pi}}{2} \cdot \frac{1}{2 \pi i} \int_{\mathcal{L}} \,\, \frac{\Gamma(s) \Gamma\left(s+\frac{1}{2}\right)}{\Gamma(1+s)\Gamma(1-s)} \left( \frac{n}{2} \right)^{-2s} \mathrm{d} s
$$
where the contour $\mathcal{L}$ goes from $\mathrm{e}^{-i \theta} \infty$ to $\mathrm{e}^{i \theta} \infty$, with $\frac{\pi}{2} < \theta < \pi$, leaving all the poles of $\Gamma$-functions in the numerator to the left. 
Thus:
$$
   \sum_{n=0}^\infty \left( \operatorname{Si}(n) - \frac{\pi}{2}\right) = -\frac{\pi}{2} - \frac{\sqrt{\pi}}{2} \cdot \frac{1}{2 \pi i} \int_{\mathcal{L}} \,\, \frac{\Gamma(s) \Gamma\left(s+\frac{1}{2}\right)}{\Gamma(1+s)\Gamma(1-s)} 4^s \zeta(2s) \mathrm{d} s 
$$
Here is a numerical confirmation:


The summand also admits the following integral representation
$$
   \operatorname{Si}(n) - \frac{\pi}{2} = -\int_0^1 J_0\left(\frac{n}{x}\right) \frac{\mathrm{d} x}{\sqrt{1-x^2}}
$$
where $J_0(x)$ stands for the Bessel function of the first kind, but I was not able to put it to a good use to answer of this question.
A: We want (changing the sign and starting with $n=1$) :
$$\tag{1}S(0)= -\sum_{n=1}^\infty \left(\mathrm{Si}(n)-\frac{\pi}{2}\right)$$
Let's insert a 'regularization parameter' $\epsilon$ (small positive real $\epsilon$ taken at the limit $\to 0^+$ when needed) :
$$\tag{2} S(\epsilon) = \sum_{n=1}^\infty \int_n^\infty \frac {\sin(x)e^{-\epsilon x}}x\,dx$$
$$= \sum_{n=1}^\infty \int_1^\infty \frac {\sin(nt)e^{-\epsilon nt}}t\,dt$$
$$= \int_1^\infty \sum_{n=1}^\infty \Im\left( \frac {e^{int-\epsilon nt}}t\right)\,dt$$
$$= \int_1^\infty \frac {\Im\left( \sum_{n=1}^\infty e^{int(1+i\epsilon )}\right)}t\,dt$$
(these transformations should be justified...)
$$S(\epsilon)= \int_1^\infty \frac {\Im\left(\dfrac {-e^{it(1+i\epsilon)}}{e^{it(1+i\epsilon)}-1}\right)}t\,dt$$
But 
$$\Im\left(\dfrac {-e^{it(1+i\epsilon)}}{e^{it(1+i\epsilon)}-1}\right)=\Im\left(\dfrac {i\,e^{it(1+i\epsilon)/2}}2\frac{2i}{e^{it(1+i\epsilon)/2}-e^{-it(1+i\epsilon)/2}}\right)$$
Taking the limit $\epsilon \to 0^+$ we get GEdgar's expression :
$$\frac {\cos(t/2)}{2\sin(t/2)}=\frac {\cot\left(\frac t2\right)}2$$
To make sense of the (multiple poles) integral obtained :
$$\tag{3}S(0)=\int_1^\infty \frac{\cot\left(\frac t2\right)}{2t}\,dt$$
let's use the cot expansion applied to $z=\frac t{2\pi}$  :
$$\frac 1{2t}\cot\left(\frac t2\right)=\frac 1{2\pi t}\left[\frac {2\pi}t-\sum_{k=1}^\infty\frac t{\pi\left(k^2-\left(\frac t{2\pi}\right)^2\right)}\right]$$
$$\frac 1{2t}\cot\left(\frac t2\right)=\frac 1{t^2}-\sum_{k=1}^\infty\frac 2{(2\pi k)^2-t^2}$$
Integrating from $1$ to $\infty$ the term $\frac 1{t^2}$ and all the terms of the series considered as Cauchy Principal values $\ \displaystyle P.V. \int_1^\infty \frac 2{(2\pi k)^2-t^2} dt\ $ we get :
$$\tag{4}S(0)=1+\sum_{k=1}^\infty\frac {\mathrm{atanh}\bigl(\frac 1{2\pi k}\bigr)}{\pi k}$$
and the result :
$$\tag{5}\boxed{\displaystyle\sum_{n=0}^\infty \left(\mathrm{Si}(n)-\frac{\pi}{2}\right)=-1-\frac{\pi}4-\sum_{k=1}^\infty\frac {\mathrm{atanh}\bigl(\frac 1{2\pi k}\bigr)}{\pi k}}$$$$\approx -1.8692011939218853347728379$$
(and I don't know why the $\frac {\pi}2$ term re-inserted from the case $n=0$ became a $\frac {\pi}4$ i.e. the awaited answer was $-S(0)-\frac{\pi}2$ !) 
Let's try to rewrite this result using the expansion of the $\mathrm{atanh}$ :
$$\mathrm{atanh(x)}=\sum_{n=0}^\infty \frac{x^{2n+1}}{2n+1}$$
so that 
$$A=\sum_{k=1}^\infty\frac {\mathrm{atanh}\bigl(\frac 1{2\pi k}\bigr)}{\pi k}=\sum_{k=1}^\infty \sum_{n=0}^\infty \frac 1{\pi k(2\pi k)^{2n+1}(2n+1)}$$
$$=\sum_{n=0}^\infty \frac 2{(2n+1)(2\pi)^{2n+2}}\sum_{k=1}^\infty \frac 1{ k^{2n+2}}$$
$$=2\sum_{n=1}^\infty \frac {\zeta(2n)}{2n-1}a^{2n}\quad \text{with}\ \  a=\frac 1{2\pi} $$
$$\tag{6}\boxed{\displaystyle\sum_{n=0}^\infty \left(\mathrm{Si}(n)-\frac{\pi}{2}\right)=-1-\frac{\pi}4-2\sum_{n=1}^\infty \frac {\zeta(2n)}{(2n-1)(2\pi)^{2n}}}$$
and... we are back to the cotangent function again since it is a generating function for even $\zeta$ constants !
$$1-z\,\cot(z)=2\sum_{n=1}^\infty \zeta(2n)\left(\frac z{\pi}\right)^{2n}$$
Here we see directly that
$$A=\frac 12\int_0^{\frac 12} \frac {1-z\,\cot(z)}{z^2} dz$$ 
with the integral result :
$$\tag{7}\boxed{\displaystyle\sum_{n=0}^\infty \left(\mathrm{Si}(n)-\frac{\pi}{2}\right)=-1-\frac{\pi}4-\int_0^1 \frac 1{t^2}-\frac {\cot\left(\frac t2\right)}{2t} dt}$$
(this shows that there was probably a more direct way to make (3) converge but all journeys are interesting !)
A: One can find the following series,
$$ \displaystyle\sum_{n=0}^\infty \left(\mathrm{Si}(n)-\frac{\pi}{2}\right) = -1 - \frac{\pi}{4} - \sum _{k=0}^{\infty}{\frac { \left( -1 \right) ^{k}{\it 
B} \left( 2\,k+2 \right) }{ \left( 2\,k+1 \right) \Gamma 
 \left( 2\,k+3 \right) }} \approx -1.869201195, $$
where $B(n)$ are the Bernoulli numbers. 
A: A bit late, but here's a more general calculation, which explains where the mysterious $\frac{\pi}{4}$ in Raymond Manzoni's answer comes from:
We will use the Fourier series
$$ \sum \limits_{n=1}^\infty \frac{\cos (ny)}{n} = - \log \left[2 \left \lvert \sin \left(\frac{y}{2}\right) \right \rvert \right] \, , \, y \in \mathbb{R} \setminus 2 \pi \mathbb{Z} \, , \tag{1} $$
and the series
$$ \log[\lvert \operatorname{sinc}(\pi z) \rvert] = \sum \limits_{k=1}^\infty \log \left(1 - \frac{z^2}{k^2}\right) \, , \, z \in \mathbb{R} \setminus \mathbb{Z} \, , \tag{2}$$
connected to Euler's sine product formula.
For $x \in \mathbb{R}^+ \setminus \mathbb{N}$ let
\begin{align}
s(x) &= \sum \limits_{n=1}^\infty \left[\frac{\pi}{2} - \operatorname{Si}(2 \pi x n)\right] = \sum \limits_{n=1}^\infty ~ \int \limits_{2 \pi x n}^\infty \frac{\sin(t)}{t} \, \mathrm{d}t \overset{\text{IBP}}{=} \sum \limits_{n=1}^\infty \left[\frac{\cos(2 \pi x n)}{2 \pi x n} - \int \limits_{2\pi x n}^\infty \frac{\cos(t)}{t^2} \, \mathrm{d} t\right] \\
&= \sum \limits_{n=1}^\infty \left[\frac{\cos(2 \pi x n)}{2 \pi x n} - \int \limits_1^\infty \frac{\cos(2 \pi x n u )}{2 \pi x n u^2} \, \mathrm{d} u\right] = \sum \limits_{n=1}^\infty \int \limits_1^\infty \frac{\cos(2\pi x n)-\cos(2 \pi x n u )}{2 \pi x n u^2} \, \mathrm{d} u \\
&\stackrel{(1)}{=} \frac{1}{2 \pi x} \int \limits_1^\infty \log\left(\left\lvert\frac{\sin(\pi x u)}{\sin(\pi x)}\right\rvert\right) \, \frac{\mathrm{d} u}{u^2} \, .
\end{align}
Interchanging summation and integration is allowed here, as can be shown by integrating by parts one more time. Next we write
$$ s(x) =  \frac{1}{2 \pi x} \int \limits_1^\infty \left[\log(u) + \log\left(\left\lvert\frac{\operatorname{sinc}(\pi x u)}{\operatorname{sinc}(\pi x)}\right\rvert\right)\right] \, \frac{\mathrm{d} u}{u^2} = \frac{1}{2 \pi x} \left[1 + \int \limits_1^\infty \log\left(\left\lvert\frac{\operatorname{sinc}(\pi x u)}{\operatorname{sinc}(\pi x)}\right\rvert\right) \, \frac{\mathrm{d} u}{u^2} \right] . $$
At this point we would like to use (2), but here interchanging summation and integration is more problematic. It works on any finite interval of integration by dominated convergence, but not on $(1,\infty)$. We therefore choose $R > 1$ such that $x R \notin \mathbb{N}$ and compute
\begin{align}
& \phantom{={}} \int \limits_1^R \log\left(\left\lvert\frac{\operatorname{sinc}(\pi x u)}{\operatorname{sinc}(\pi x)}\right\rvert\right) \, \frac{\mathrm{d} u}{u^2} \stackrel{(2)}{=}  \sum \limits_{k=1}^\infty \int \limits_1^R \log \left(\left \lvert \frac{k^2 - x^2 u^2}{k^2-x^2} \right \rvert \right) \, \frac{\mathrm{d} u}{u^2} \\
&\!\overset{\text{IBP}}{=} \sum \limits_{k=1}^\infty \left[\log \left(\left \lvert \frac{k^2 - x^2 R^2}{k^2-x^2} \right \rvert \right) \left(\frac{x}{k} - \frac{1}{R}\right) + \int \limits_1^R \frac{2 x^2 u}{k^2 - x^2 u^2} \left(\frac{x}{k} - \frac{1}{u}\right) \, \mathrm{d} u\right] \\
&= \sum \limits_{k=1}^\infty \left[\log \left(\left \lvert \frac{k^2 - x^2 R^2}{k^2-x^2} \right \rvert \right) \left(\frac{x}{k} - \frac{1}{R}\right) - \frac{2 x^2}{k} \int \limits_1^R \frac{\mathrm{d} u}{k + x u}\right] \\
&= \sum \limits_{k=1}^\infty \left[\frac{x}{k} \left(\log \left(\left \lvert \frac{k + x}{k-x}\right\rvert\right) - \log \left(\left \lvert \frac{k + xR}{k-xR}\right\rvert\right) \right) - \frac{1}{R} \log \left(\left \lvert \frac{k^2 - x^2 R^2}{k^2-x^2} \right \rvert \right) \right] \\
&\stackrel{(2)}{=} 2 x [f(x) - f(x R)] - \frac{1}{R}  \log\left(\left\lvert\frac{\operatorname{sinc}(\pi x R)}{\operatorname{sinc}(\pi x)}\right\rvert\right) .
\end{align}
Here, we have introduced
$$ f \colon \mathbb{R}^+ \setminus \mathbb{N} \to \mathbb{R}^+ \, , \, f(t) = \sum \limits_{k=1}^\infty \frac{1}{2k} \log \left(\left \lvert \frac{k + t}{k-t}\right\rvert\right) = \sum \limits_{k=1}^\infty \frac{1}{k} \operatorname{artanh} \left[\min \left(\frac{k}{t},\frac{t}{k}\right)\right] .$$
Letting $R \to \infty$, we find
$$ s(x) = \frac{1}{2\pi x} + \frac{f(x) - f(\infty)}{\pi} \, .$$
The limit
\begin{align}
f(\infty) &= \lim_{t \to \infty} f(t) = \lim_{\varepsilon \to 0^+} f\left(\frac{1}{\varepsilon}\right) = \lim_{\varepsilon \to 0^+} \varepsilon \sum \limits_{k=1}^\infty \frac{1}{\varepsilon k} \operatorname{artanh} \left[\min\left(\varepsilon k, \frac{1}{\varepsilon k}\right)\right] \\
&= \int \limits_0^\infty \frac{\operatorname{artanh} \left[\min\left(r, \frac{1}{r}\right)\right]}{r} \, \mathrm{d} r = 2 \int \limits_0^1 \frac{\operatorname{artanh} (r)}{r} \, \mathrm{d} r = 2 \frac{\pi^2}{8} = \frac{\pi^2}{4}
\end{align}
can be computed using improper Riemann sums (see this question; the monotonicity condition can be circumvented by splitting the series at $k = \lfloor 1/\varepsilon \rfloor$ and thus the integral at $r=1$). Therefore,
$$ s(x) = \frac{1}{2\pi x} - \frac{\pi}{4} + \frac{1}{\pi} \sum \limits_{k=1}^\infty \frac{1}{k} \operatorname{artanh} \left[\min \left(\frac{k}{x},\frac{x}{k}\right)\right] $$
holds for $x \in \mathbb{R}^+ \setminus \mathbb{N}$. In particular, your series is
$$ - s\left(\frac{1}{2\pi}\right) - \frac{\pi}{2} = -1 - \frac{\pi}{4} - \frac{1}{\pi} \sum \limits_{k=1}^\infty \frac{1}{k} \operatorname{artanh} \left(\frac{1}{2 \pi k}\right) . $$
