This formula, while
widely believed to be correct, has not yet been proved.
$$
\frac{\int\limits_2^x{\frac{dt}{\ln t}} - \# \{\text{primes}\le
x\} }
{\sqrt x/\ln x} \approx 1 + 2\sum_{\gamma} \ \ \frac{\sin(\gamma\ln x)}{\gamma},
\tag{3}
$$
with $\gamma$ being imaginary part of the roots of the $\zeta$ function.

$\dots$

For example, if the Generalized Riemann Hypothesis is
true for the function $L(s)$ just defined, then we get the formula
$$
\frac{\#\{\text{primes}\ 4n+3 \le x\} - \#\{\text{primes}\ 4n+1
\le x\}} {\sqrt x/\ln x} \approx 1 + 2\sum_{\gamma^\prime}
\frac{\sin(\gamma^\prime\ln x)}{\gamma^\prime}, \tag{4'}
$$
with $\gamma^\prime$ being imaginary part of the roots of the Dirichlet $L$-function associated to the race between primes of
the form $4n+3$ and primes of the form $4n+1$, which is
$$
L(s) = \frac1{1^s} - \frac1{3^s} + \frac1{5^s} - \frac1{7^s} + \dots.
$$

Is there another way to get $\# \{\text{primes}\ 4n+3 \le x\}$ using a different Dirichlet $L$-function? How does it look like? Is it possible to treat the general case of $\# \{\text{primes}\ kn+m \le x\}$ the same way?

Dirichlet's theorem states that if a and d are coprime natural numbers, then the arithmetic progression a, a+d, a+2d, a+3d, … contains infinitely many prime numbers. Let π(x,a,d) denote the number of prime numbers in this progression which are less than or equal to x. If the generalized Riemann hypothesis is true, then for every coprime a and d and for every ε > 0
$$
\pi(x,a,d) = \frac{1}{\varphi(d)} \int_2^x \frac{1}{\ln t}\,dt + O(x^{1/2+\epsilon})\quad\mbox{ as } \ x\to\infty
$$
where φ(d) is Euler's totient function and O is the Big O notation. This is a considerable strengthening of the prime number theorem.

So my example would look like
$$
\pi(x,3,4) = \frac{1}{\varphi(4)}\text{Li}(x) + O(x^{1/2+\epsilon}),
$$
(something that already ask/answered here: Distribution of Subsets of Primes). So the part with the roots seems to be burried in $O(x^{1/2+\epsilon})$, since $\varphi(4)=2$.

The answer to (2) is probably "no" because there is no Dirichlet character that is $1$ on the equivalence class $3\bmod4$ and $0$ otherwise. As for (1), and whether there is any sort of $L$-function to answer (2), I'd have to read more about where the counting asymptotic comes from.
–
anonMay 30 '12 at 23:14

For (2), if you could it do for any $m \bmod k$ and show why it is not possible for others, it'd be ever so happy. Thanks so far.
–
draks ...May 31 '12 at 5:23

@anon Why is such a Dirichlet character necessary? It would determine the $L$-function, but how to get $\#\{\text{primes } 4n+3\le x\}$ in terms of the roots of that $L$-function from that?
–
draks ...Jun 4 '12 at 10:48

4 Answers
4

(1) is a correct computation. In general, to treat primes of the form $kn+m$, you would have a linear combination of $\phi(k)$ sums, each of which runs over the zeros of a different Dirichlet $L$-function (of which the Riemann $\zeta$ function is a special case). And yes, assuming the generalized Riemann hypothesis, all of the terms including those sums over zeros can be estimated into the $O(x^{1/2+\epsilon})$ term.

To find out more, you want to look for "the prime number theorem for arithmetic progressions", and in particular the "explicit formula". I know it appears in Montgomery and Vaughan's book, for example.

Greg, as Raymond worked out here, the expression for $\pi_{4n+1}^*(x)-\pi_{4n+3}^*(x)\approx -\sum_{\rho} R(x^{\rho})$, with $\rho$ being the roots of the $\beta$ function, introduces some irregualities. We started a chat and would be happy if you could join and bring some light into the dark...
–
draks ...Jan 30 '13 at 22:48

Here is how far I got with an explicit formula for the number of primes of the form $4n+3$ below $x$, $\pi^*(x;4,3)$, expressed in terms of (sums of) sums of Riemann's $R$ functions over roots of Riemann's $\zeta$ resp. Dirichlet $\beta$ function:

Thanks once more, how did you calculate that? I mean what software did you use?
–
draks ...Jan 7 '13 at 18:41

1

@draks... I used some quick and dirty scripts I wrote for pari/gp. The 'dirty' part means that I could have missed some zeros (searching alternating signs of the real part in fixed intervals of $0.01$ and $0.005$ so that zeros could have been overlooked... probably not many).
–
Raymond ManzoniJan 7 '13 at 20:02

1

I think I'll have to get a hand on that pari/gp...
–
draks ...Jan 7 '13 at 20:51

UPDATE: The point of this answer is to visualize your exact formula for the prime counting function restrained to primes $\equiv 3 \bmod 4$. The sums over $\rho_\zeta$ and over $\rho_\beta$ are over all the zeros of the Riemann-$\zeta$ and Dirichlet-$\beta$ functions respectively sorted by increasing absolute imaginary part :
$$\pi_{Dr}(x):=\sum_{k=0}^\infty\;2^{-k-1}\left(
\operatorname{R}\left(x^{1/2^{k}}\right)-\sum_{\rho_\zeta}
\operatorname{R}\left(x^{\rho_\zeta/2^k}\right) +\sum_{\rho_\beta}
\operatorname{R}\left(x^{\rho_\beta/2^k}\right) \right)-1$$

(I subtracted $1$ at the end as found necessary by this other derivation using your nice telescoping method)

The plot of the approximation obtained by truncating the infinite series to their first terms (the parameters used are indicated at the end) is compared to the exact (darker) formula for $\pi_{4,3}(x)$ with $x\in (4,150)$ (the picture may be zoomed) :

To let you play with your function I included my scripts. They require two precomputed tables of zeros of zeta and beta. I used Andrew Odlyzko's fine table of zeta zeros and the beta zeros came from my older answer here. These tables should be formated as $[v_1, v_2,\cdots,v_n]$ on one line or
$[v_1\,,\backslash$
$\;v_2\,,\backslash$
$\cdots,\backslash$
$\;v_n\,]$

The $\operatorname{Ei}$ (exponential integral) function uses continued fractions for large imaginary parts of $z$ and the built-in function elsewhere (the last one should suffice once corrected in pari). The partial Riemann function $\operatorname{R}$ uses $\,\operatorname{lx}=\log x$ as parameter instead of $x$ and we are comparing the classical $\pi_{4,3}(x)$ function to your exact function $\pi_{Dr}(x)$. More exactly to the partial sum obtained by using only the $n$ first terms of $\operatorname{R}()$, the $r$ first complex roots of $\zeta$ and $\beta$ and the $p$ first powers of $2$ (sum over $k$) from your exact formula.

Raymond, thank you so much. I'm very happy that this (the formula) worked out that well. Thanks also for the PARI scripts. Just yesterday I tried to start with it and now you gave me such nice example to work with and to learn.
–
draks ...Jun 6 '13 at 9:29

Glad you liked it @draks ! To make it more useful I had to speed up $\operatorname{Ei}$ and succeeded simply by replacing pari's native implementation of the $E_1$ function ('eint1' limited to real values) by the more general incomplete gamma function ('incgam' that works for all complex values at least in my release $2.6.0$) using $\,E_{\nu}(z)=z^{\nu-1}\,\Gamma(1-\nu,z)\,$ with $\nu=1$. The result is that the plot was obtained in a little more than $5$ minutes instead of $3,5$ hours. Not bad ! :-) Fine continuation !
–
Raymond ManzoniJun 7 '13 at 22:59

Btw there is a bug in the incgam() function implementation in pari (I submitted a bug report). To limit the error in the meantime use a lower precision of 19 digits with \p 19 (or 9) or the C.F. method in my initial answer when the absolute value of the imaginary part is larger than (say) $20$.
–
Raymond ManzoniJun 9 '13 at 16:54

@draks: I updated my answer in the other thread. It seems that the shift was of $1$ and probably due to the missing prime $2$. (I'll update my answer here later). Concerning the pari/gp formula I use Ei(z)=if(abs(imag(z))<20,PiIsign(imag(z))-incgam(0,-z),local(n=5+round(1000/(a‌​bs(imag(z))+1e-8)),r=-z);forstep(k=n,1,-1,r=-z+k/(1+k/r));-exp(z)/r)+PiIsign(im‌​ag(z)) (until the pari bug is solved).
–
Raymond ManzoniJun 11 '13 at 23:52

Raymond, it looks amazing. Thanks for all your support. I'm a little busy with other things these days, but, at least for me, the story doesn't end here. I've got more questions... BTW: sorry for the late reply. I was on vacation.
–
draks ...Jun 17 '13 at 21:29