Convergence of $\sum_{p>2} \frac{(-1)^{\frac{p-1}{2}}}{p}$ 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!
 A: 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.
A: Well,
it depends on whether
$p \bmod 4$
is 1 or 3.
What matters is
$m(x, k, j)
=\#\{\text{primes }kn+j\le x\}
$
for
$k=4, j = 1, 3
$.
It is known that,
as $x \to \infty$,
$\dfrac{m(x, 4, 3)}{m(x, 4, 1)}
\to 1
$.
From the study of "primes races"
(see https://dms.umontreal.ca/~andrew/PDF/PrimeRace.pdf
)
it is known that
$m(x, 4, 3)$
is usually larger that
$m(x, 4, 1)$.
However,
Littlewood showed that
there are arbitrarily large $x$
such that
$m(x, 4, 1)-m(x, 4, 3)
\ge \dfrac{\sqrt{x}\ln\ln(x)}{2\ln(x)}
$.
The following results
are known.
$m(x, k, j)
\sim \dfrac{x}{\phi(k)\ln(x)}
\sim \dfrac{li(x)}{\phi(k)}
$
(where
$li(x)$ is the logarithmic integral
and
$\phi(k)$ is Euler's phi function)
and,
as referenced in
https://primes.utm.edu/notes/Dirichlet.html,
$m(x, k, j)
- \dfrac{li(x)}{\phi(k)}
=O(xe^{-a\sqrt{\ln(x)}})
$
for $a = 1/15$.
This implies that
$|m(x, 4, 3)-m(x, 4, 1)|
=O(xe^{-a\sqrt{\ln(x)}})
$.
I believe that
this is enough to show that
the sum in the problem converges.
But I don't know for sure
and I'll leave it at this.
