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

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).


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 Chebyshev, 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$,