# Is $\pi (x)=\operatorname{R}(x)-\sum_{\rho}\operatorname{R}(x^{\rho})$ correct at all?

It should be the case that, in some appropriate sense $$\pi (x)\sim \operatorname{Ri}(x)-\sum_{\rho}\operatorname{Ri}(x^{\rho}) \tag*{(4)}$$ with $$\operatorname{Ri}$$ denoting the Riemann function defined: $$\operatorname{Ri}(x)=\sum_{m=1}^\infty \frac{\mu (m)}{m}\operatorname{li}\left(x^{\frac{1}{m}}\right). \tag*{(5)}$$ This relation $$(4)$$ has been called "exact" [in Ribenboim's The New Book of Prime Number Records], yet we could not locate a proof in the literature; such a proof should be nontrivial, as the conditionally convergent series involved are problematic. In any case relation $$(4)$$ is quite accurate, and furthermore the Riemann function $$\operatorname{Ri}$$ can be calculated efficiently (...) The sum in $$(4)$$ over critical zeros is not absolutely convergent, and furthermore the phases of the summands interact in a frightfully complicated way.

—from Journal of Computational and Applied Mathematics by Borwein et al.

Of profound importance, Bernhard Riemann proved that the prime-counting function is exactly $$\pi (x)=\operatorname{R}(x)-\sum_{\rho}\operatorname{R}(x^{\rho})$$ where $$\operatorname{R}(x)=\sum_{n=1}^\infty \frac{\mu (n)}{n}\operatorname{li}\left(x^{\frac{1}{n}}\right),$$ (...) $$\rho$$ indexes every zero of the Riemann zeta function, and $$\operatorname{li}\left(x^{\frac{\rho}{n}}\right)$$ is not evaluated with a branch cut but instead considered as $$\operatorname{Ei}\left(\frac{\rho}{n}\ln x\right)$$. Equivalently, if the trivial zeros are collected and the sum is taken only over the non-trivial zeros $$\rho$$ of the Riemann zeta function, then $$\pi (x)$$ may be written $$\pi (x)=\operatorname{R}(x)-\sum_{\rho}\operatorname{R}(x^{\rho})-\frac{1}{\ln x}+\frac{1}{\pi}\arctan\frac{\pi}{\ln x}.$$

—from Wikipedia's Prime counting function article (before 30/7/2021)

Questions:

1. According to Borwein and Ribenboim, the index in $$(4)$$ should run only over non-trivial zeros. According to Wikipedia, the index in $$(4)$$ should run over all zeros. Wikipedia states that if the sum runs only over non-trivial zeros, then we add the $$\ln$$ and $$\arctan$$ terms, which is even more confusing. So what's true?

2. I'm pretty sure that Riemann did not prove the formula $$(4)$$. He only proposed a "weaker" form of it, namely $$\pi (x)=\sum_{m=1}^\infty \frac{\mu (m)}{m}J\left(x^{\frac{1}{m}}\right)$$ where $$J(x)=\operatorname{li}(x)-\sum_{\rho}\operatorname{li}\left(x^{\rho}\right)+\int_x^\infty \frac{dt}{t(t^2-1)\ln t}-\ln 2$$ and where $$\rho$$ runs over all non-trivial zeros. The formula was proven by Mangoldt, not Riemann. The Wikipedia article is wrong in that historical fact, isn't it?

3. Even though the proof of $$(4)$$ is nowhere to be found in the literature, Raymond Manzoni provided a partial proof here. I call it partial because it is unknown whether the series converges at all: How could that be settled down?

Note: When I refer to the formula $$(4)$$ in this question, I assume $$=$$ instead of $$\sim$$.

Riesel and Gohl

Riesel and Gohl show in Some Calculations Related to Riemann's Prime Number Formula that $$\sum_{n=1}^N \frac{\mu (n)}{n}\left(\int_{x^{\frac{1}{n}}}^\infty \frac{\mathrm dt}{t(t^2-1)\ln t}-\ln 2\right)=\frac{1}{2\ln x}\sum_{n=1}^N \mu (n)+\frac{1}{\pi}\arctan\frac{\pi}{\ln x}+\epsilon (x,N)$$ where $$\epsilon (x,N)=-\sum_{n=N+1}^\infty \frac{\mu (n)}{n}\left(\frac{1}{2}\ln\ln x+C\right)+\frac{1}{2}\sum_{n=N+1}^\infty \frac{\mu (n)\ln n}{n}+\sum_{n=N+1}^\infty \frac{\mu (n)}{n}\sum_{k=1}^\infty \frac{1}{\pi k}\arctan\frac{\ln x}{n\pi k}$$ where $$C=\sum_{k=1}^\infty \frac{1}{\pi k}\arctan\frac{1}{\pi k}+\int_1^\infty \frac{\mathrm du}{u(e^{2u}-1)}-\ln 2+\frac{1}{2}.$$ Now, $$\epsilon\to 0$$ as $$N\to\infty$$. If $$\sum_{n=1}^\infty \mu (n)=-2$$, then $$\sum_{n=1}^\infty \frac{\mu (n)}{n}\int_{x^{\frac{1}{n}}}^\infty \frac{\mathrm dt}{t(t^2-1)\ln t}=\frac{1}{\pi}\arctan\frac{\pi}{\ln x}-\frac{1}{\ln x}.$$

But this uses the zeta-regularized result $$\sum_{n=1}^\infty \mu (n)=-2$$. It is one way of assigning a finite value to a divergent sum, obtained by just plugging $$s=0$$ in $$\frac{1}{\zeta (s)}=\sum_{n=1}^\infty \frac{\mu (n)}{n^s}.$$

In general, this assigning of values is arbitrary. There are lots of ways to do that. I don't understand how can this arbitrary choice produce an "empirically-correct" result about the distribution of prime numbers. In fact, the paper of Riesel and Gohl implies the mysterious formula $$\pi (x)= \operatorname{R}(x)-\sum_{\rho}\operatorname{R}(x^{\rho})-\frac{1}{\ln x}+\frac{1}{\pi}\arctan\frac{\pi}{\ln x}.$$ For the empirical results, see here.

Questions [continued]:

1. What makes zeta-regularization (or other regularizations producing the same value) the only regularization that seems to produce the "empirically-correct" result? Or is it the case that the result is ultimately wrong?

Note: $$\operatorname{li}x$$ is to be interpreted as the Cauchy principal value of $$\operatorname{Ei}\ln x$$.

This question has been on MSE for some time, but it still doesn't have any answers, so I decided to post it here.

Edit: The Wikipedia formula (before 30/7/2021) $$\pi (x)= \operatorname{R}(x)-\sum_{\rho}\operatorname{R}(x^{\rho})-\frac{1}{\ln x}+\frac{1}{\pi}\arctan\frac{\pi}{\ln x}$$ turned out to be a misinterpretation of Riesel and Gohl.

• The trivial zeros contribution is simple enough that it can be expressed in closed form - that's the arctan and other terms you're seeing. Mar 11, 2021 at 23:30
• $(4)$ should be exact in the sense of distributions Mar 12, 2021 at 3:03
• Landau has a paper published in Ann. Ec. Norm., (3) 25, (1908) 399-442 with title something as "New proof of Riemann's formula for the number of prime numbers less than a limit", but I am translating this from my Spanish translation of the paper. In this paper Landau (with all the care to the detail that we all know) proves this formula. Showing in particular the convergence of the series of $\text{Li}(x^\rho)$ adequately ordered.
– juan
Jul 20, 2021 at 21:22
• @Wane Here it is the paper in French numdam.org/volume/ASENS_1908_3_25
– juan
Jul 20, 2021 at 21:42
• @Emil Jeřábek The user vitamin d already told me he is going to edit the article today.
– Wane
Jul 30, 2021 at 15:34

Preliminaries. We will denote the slight modifications of the prime counting function and the prime power counting function with $$\pi^*$$ and $$J^*$$ respectively, which assume a halfway step at discontinuities. Furthermore we will denote the non-trivial zeros of the zeta function with $$\rho$$ and all zeros i.e. the trivial and non-trivial zeros with $$\varrho$$ in questions two to four.

Q1. It depends on what the meaning of $$\sim$$ in the statement $$\pi^* (x)\sim \operatorname{Ri}(x)-\sum_{\rho}\operatorname{Ri}(x^{\rho})$$ is. Putting convergence questions aside, which we will discuss in Q3, we indeed have an equality if the sum runs over all zeros of $$\zeta$$. If we omit the trivial zeros, the statement might still be correct, if $$\sim$$ denotes asymptotic equivalence since $$\sum_n\operatorname{Ri}(x^{-2n})=o(1).$$ This is because
$$\left\lvert\lim_{x\to\infty}\sum_n\sum_m \frac{\mu(m)}{m}\operatorname{li}(x^{-2n/m})\right\rvert \leqslant \lim_{x\to\infty}\sum_n\sum_m \frac{1}{m}\left\lvert\operatorname{li}(x^{-2n/m})\right\rvert\overset{\text{(Tonelli)}}{=}0.$$

Q2. "Proposed" might not be the best fitting word. Riemann showed and proved essential ideas of his, while leaving out certain steps, which caused a certain lack of rigor. Hence, Riemann's proof was not complete. Quoting Edwards, p.38, 1.19 QUESTIONS UNRESOLVED BY RIEMANN:

Riemann evidently believed that he had given a proof of the product formula for $$\zeta(s)$$, but, at least from the reading of the paper given above, one cannot consider his proof to be complete, and, in particular, one must question Riemann's estimate of the number of roots $$\rho$$ in the range $$\{0 < \operatorname{Im} \rho < T\}$$ on which this proof is based. It was not until 1893 that Hadamard proved the product formula, and not until 1905 that von Mangoldt proved the estimate of the number of roots in $$\{0 < \operatorname{Im} \rho < T\}$$.

Q3. We want to prove that $$\pi^*(x)=\operatorname{R}(x)-\sum_{\varrho} \operatorname{R}(x^{\varrho})$$ follows from $$\pi^*(x)=\sum_{m=1}^{\infty}\frac{\mu(m)}{m}J^*(x^{1/m})$$. Define $$\pi_X^*\colon \mathbb R_{>1}\to\mathbb N$$ as $$x\mapsto\sum_{m\leqslant X}\frac{\mu(m)}{m}J^*(x^{1/m}),$$ where $$X>1$$. If $$X>\log_2(x)$$, then $$\pi_X^*(x)=\pi^*(x)$$, since $$J^*(x)=0$$ for $$x<2$$. After applying Möbius inversion on $$J^*$$ we get that for all $$X>\log_2(x)$$ $$\pi^*(x)=\sum_{m\leqslant X}\frac{\mu(m)}{m}\operatorname{li}(x^{1/m})-\sum_{\varrho}\sum_{m\leqslant X}\frac{\mu(m)}{m}\operatorname{li}(x^{\varrho/m})-\log 2\sum_{m\leqslant X}\frac{\mu(m)}{m}.$$ We were able to change the order of summation involving the conditional convergent series since the series over $$m$$ is finite. Now the idea is not to look at the case $$X\to\infty$$ separately. There exists an $$N\in\mathbb N$$ for every $$X>1$$ so that $$\pi^*_X(x)=\pi^*_N(x)$$. The sequence $$(\pi_N^*)_{N\in\mathbb N}$$ converges since it is Cauchy.

Q4. Riesel's and Göhl's objective was to find an approximation and not an exact form of the last two terms of $$\pi_N(x)$$, $$\sum_{n=1}^N \frac{\mu (n)}{n}\left(\int_{x^{\frac{1}{n}}}^\infty \frac{\mathrm dt}{t(t^2-1)\ln t}-\ln 2\right)$$. The integral is equivalent to $$\sum_m\operatorname{li}(x^{-2n/m})$$. They eventually showed that it is equal to $$\frac{1}{2\ln x}M(N)+\frac{1}{\pi}\arctan\frac{\pi}{\ln x}+\epsilon (x,N),$$ where $$M$$ denotes the Mertens function and $$\epsilon$$ is an error term, which tends to zero as $$N\to\infty$$. In order to make the calculation more efficient they replace the Mertens function with $$-2$$ and argue on page 979 as follows:

It is thus advantageous to choose such a value of $$N$$ that the sums $$g_k$$ become comparatively small. It also is advantageous to have $$\sum_1^N\mu(n) = -2$$ at the same time, since (32) then has the order of magnitude only $$= O((\log x)^{-3})$$ instead of $$O((\log x)^{-1})$$.

Here no zeta regularization was used. The triple sums in the error term are dependent on $$g_k$$. There exist infinitely many $$N$$ such that $$M(N)=-2$$. This immediately follows from the bounds $$\liminf~M(n)/\sqrt n < -1.009$$ and $$\limsup~M(n)/\sqrt n > 1.06$$, which were used to disprove the Mertens conjecture.

• So the Wikipedia formula (en.wikipedia.org/wiki/Prime-counting_function) $\pi _0(x)=\operatorname{R}(x)-\sum_{\rho}\operatorname{R}(x^{\rho})-\frac{1}{\log x}+\frac{1}{\pi}\arctan\frac{\pi}{\log x}$ is incorrect?
– Wane
Jul 27, 2021 at 19:08
• Regarding Q2 – I didn't consider an incomplete proof to be a proof, but it is understandable that someone prefers to consider incomplete "proofs" to be proofs.
– Wane
Jul 27, 2021 at 19:19
• This was not mentioned in my post but it is related: $\operatorname{R}(x)=1+\sum_{n=1}^\infty \frac{(\ln x)^n}{nn!\, \zeta (n+1)}$. Using $\operatorname{R}(x^{\varrho})=1+\sum_{n=1}^\infty \frac{(\ln (x^{\varrho}))^n}{nn!\, \zeta (n+1)}$ leads to wrong results. Why is simply using $\operatorname{R}(x^{\varrho})=1+\sum_{n=1}^\infty \frac{(\varrho\ln x)^n}{nn!\, \zeta (n+1)}$ enough to fix the issue?
– Wane
Jul 27, 2021 at 19:28
• Riesel and Göhl replaced $M(N)$ with $-2$ for all $N$, which results in a loss of an equality. However the error terms are very small: For $N=154$, the error $\lvert p+\epsilon\rvert$ is less than $1.2\cdot10^{-4}$. Jul 27, 2021 at 22:10
• After calculating the Inverse Mellin transform of $\log\zeta$ the result of the second term of $J^*$ is $\operatorname{Ei}(\rho \log x)$ and not $\operatorname{Ei}( \log(x^\rho))$, which can be converted into the Gram series with the well-known series representation of $\operatorname{Ei}$. Jul 27, 2021 at 22:16