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!


2 Answers 2


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.

  • $\begingroup$ What is this $L$ function? I have never seen it before. $\endgroup$ Jul 16, 2020 at 2:11
  • $\begingroup$ It's called a Dirichlet $L$-function; it's the most basic generalisation of the Riemann zeta function, used, for example, in the proof of Dirichlet's theorem on an infinitude of primes in arithmetic progressions, or in the proof of the prime number theorem for arithmetic progressions. $\endgroup$ Jul 16, 2020 at 2:12
  • $\begingroup$ Neat - I will read more about it. Thanks for the explanation! $\endgroup$ Jul 16, 2020 at 2:13
  • $\begingroup$ I wonder if there is an elementary way, based on adapting Mertens theorem's proof from $\sum_{n\le x}\log n$ to $\sum_{a^2+b^2\le x}\log (a^2+b^2) $ $\endgroup$
    – reuns
    Aug 3, 2020 at 11:40
  • $\begingroup$ @reuns I suppose there should be, since it is $4 \sum_{n \leq x} \log n \sum_{d \mid n} \chi_{-4}(d)$. You should then be able to use the Dirichlet hyperbola method. $\endgroup$ Aug 3, 2020 at 11:56

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.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .