TITLE: Convergence of $\sum_{p>2} \frac{(-1)^{\frac{p-1}{2}}}{p}$
QUESTION [10 upvotes]: Consider the sum $\sum_{p>2} \frac{(-1)^{\frac{p-1}{2}}}{p}$ where $p$ runs only through all odd primes. Show that this sum converges.
The possibly best approach I have until now is via Partial summation, but dealing with number of primes
is troubling, especially for obtaining explicit bounds.
Any help appreciated!

REPLY [9 votes]: This is $\sum_p \frac{\chi(p)}{p}$, where $\chi$ denotes the quadratic Dirichlet character modulo $4$. We note that for $\Re(s) > 1$,
$$\log L(s,\chi) = \log \prod_p \frac{1}{1 - \chi(p) p^{-s}} = -\sum_p \log (1 - \chi(p) p^{-s}) = \sum_p \sum_{k = 1}^{\infty} \frac{\chi(p)^k}{kp^{ks}}.$$
By the zero-free region for $L(s,\chi)$, this identity extends to $s = 1$. Furthermore,
$$L(1,\chi) = \sum_{n = 1}^{\infty} \frac{\chi(n)}{n} = \frac{\pi}{4}$$
(either by Dirichlet's class number formula or by the power series expansion of $\arctan(x)$), and so
$$\sum_p \frac{\chi(p)}{p} = \log \frac{\pi}{4} - \sum_{k = 2}^{\infty} \sum_{p} \frac{\chi(p)^k}{kp^k}.$$
There are various ways to bound the second term. For example, the contribution from the term for which $k = 2$ is $\frac{1}{8} - \frac{1}{2}\sum_p \frac{1}{p^2} \approx -0.101$ (by Wolfram Alpha, since $\sum_p p^{-s}$ is the prime zeta function). The remaining terms can be bounded by noting that
$$\left|\sum_{k = 3}^{\infty} \sum_{p} \frac{\chi(p)^k}{kp^k}\right| < \frac{1}{3} \sum_{p > 2} \sum_{k = 3}^{\infty} \frac{1}{p^k} = \frac{1}{3} \sum_{p > 2} \frac{1}{p^2(p - 1)} < \frac{1}{3} \sum_p \frac{1}{p^3} \approx 0.058$$
(again using Wolfram Alpha for the last sum). With more effort, one can of course improve this.