# Sums of reciprocals of prime numbers: $p \equiv a \!\! \mod m$ vs. $p \equiv b \!\! \mod m$

Given positive integers $a$, $m$ and $n$, let $s_{a(m)}(n)$ denote the sum of the reciprocals of the prime numbers less than or equal to $n$ which are congruent to $a$ modulo $m$.

Is there an integer $n$ such that $s_{1(3)}(n) > s_{2(3)}(n)$?

For small $n$, the function $s_{2(3)}$ is clearly ahead -- for example it exceeds $1$ already at $n = 59$, while for $s_{1(3)}$ this takes until $n = 3560503$.

Even if the answer is no, are there still other residue classes $a(m)$ and $b(m)$ such that the function $$f_{a(m),b(m)}: \mathbb{N} \rightarrow \mathbb{R}, \ \ n \mapsto s_{a(m)}(n) - s_{b(m)}(n)$$ has infinitely many sign changes?

Does $f_{a(m),b(m)}(n)$ converge for $n \rightarrow \infty$, and if so, is there anything known about the constants $c_{a(m),b(m)} := \lim_{n \rightarrow \infty} f_{a(m),b(m)}(n)$?

-

Note that $$s_{1(3)}(n)-s_{2(3)}(n) = \sum_{p\le n} \frac{\chi_{-3}(p)}{p}$$ where $\chi_{-3}$ is the real Dirichlet character $\pmod 3$ (ie the Legendre symbol). This sum converges (as in the proof of Dirichlet's theorem). So if it starts out being negative for a long while, it will continue to be negative. The limiting value is $$\log L(1,\chi_{-3}) - \sum_{k=2}^{\infty} \sum_{p} \frac{\chi_{-3}(p^k)}{kp^k}.$$ Note that $L(1,\chi_{-3}) = \pi/(3\sqrt{3})$ which is less than $1$ and the second term also makes a negative contribution.

Similarly for any other two residue classes. The function $f$ eventually will have constant sign (converging to a particular value indeed).

-
Thank you very much! -- As you conclude from convergence to finitely many sign changes: is it impossible that the limit is 0 for some pair of residue classes? –  Stefan Kohl Dec 1 '13 at 15:52
@Stefan Kohl: That's a good point. The limiting value can be written in terms of logs of $L$-values and absolutely convergent series as in the example for modulus $3$ above. It is possible that this might vanish, although one might guess that it never happens. –  Lucia Dec 1 '13 at 15:56

There is a detailed survey Comparative prime number theory: A survey Greg Martin, Justin Scarfy.

It contains numerous results on this "comparative prime number theory", which goes back to Chebychev, Knapowski and Turan, and others. In this area there are several results which indicate that primes in "quadratic residue classes" occur (in some precise technical sense) less often than primes in quadratic non-residue classes.

For example, for your question modulo 3, Theorem 5.6 is of interest, which answers your question for a different weight. $\lim_{x \rightarrow \infty} \sum_p \chi_3(p) \frac{\log p}{p^{1/2}} \exp(-(\log^2 p)/x)=-\infty$. (Here $\chi_3(p)=1$, if $p=1 \bmod 3$, and $\chi_3(p)=-1$ if $p=2 \bmod 3$,

-
Thanks! -- Though it seems to me that already the 4th line of the introduction of the paper you refer to states something which is plainly wrong, as even $\sum_{n=1}^\infty e^{-n}$ converges -- or am I dense at the moment? –  Stefan Kohl Dec 1 '13 at 20:59
The part you refer is a historical comment on an informal letter of Chebychev. Indeed, Chebychev's comments are known to me not at the level of "proven results", see for example Narkiewicz (The development of prime number theory...), p. 122-124 books.google.at/… In this particular case it seems likely to me that a typos must have been copied from one source to another, and even the statemnet in Narkiewicz should read –  Christian Elsholtz Dec 2 '13 at 7:25
[continued.] $\lim_{x \rightarrow \infty} \sum_p (-1)^{\frac{p+1}{2}} \exp(-p/x)=\infty$. –  Christian Elsholtz Dec 2 '13 at 7:34
There definitely are typos, or prose that could be cleared up, in our paper (including the one Stefan pointed out). Perhaps in the future I'll be able to clean up these imperfections; I certainly welcome any errors emailed to me at gerg@math.ubc.ca . –  Greg Martin Dec 2 '13 at 7:56