# Is there an elegant exact formula for the zeta zero counting function?

I've noticed the zeta zero counting function defined in formula (1) below isn't exactly correct as was pointed out in this related question and answer on MathOverflow. The function $$\vartheta(T)$$ is the Riemann–Siegel theta function.

(1) $$\quad N_0(T)=1+\frac{\vartheta(T)}{\pi}+\frac{\arg\left(\zeta\left(\frac12+i\,T\right)\right)}{\pi}$$

$$\qquad\qquad\quad\ =1+\frac{\vartheta(T)}{\pi}+\frac{\Im\left(\log\zeta\left(\frac12+i\,T\right)\right)}{\pi}$$

Some of the comments on the question and answer linked above seem to argue that formula (1) above is exactly correct so I'll attempt to clarify with a few illustrations.

Figure (1) below illustrates $$\frac{\vartheta(T)}{\pi}$$ in orange, $$\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$$ in green, and $$N_0(T)$$ in blue. The red discrete dots represent the evaluation points $$(\Im(\rho_k),k-1/2)$$. Note $$N_0(T)$$ seems to evaluate exactly as desired in the range of $$T$$ values illustrated in Figure (1) below.

Figure (1): Illustration of $$\frac{\vartheta(T)}{\pi}$$ (orange), $$\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$$ (green), and $$N_0(T)$$ (blue)

Now consider Figures (2) and (3) below which illustrate the evaluations of $$\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$$ and $$N_0(T)$$ in the neighborhood of Gram point $$g_{126}$$ and zeta zero $$\rho_{127}$$. The green dots in Figures (2) and (3) below represent the evaluations of $$\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$$ and $$N_0(T)$$ at $$T=g_{126}+\epsilon$$, and the red dots in Figures (2) and (3) below represent the evaluations of of $$\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$$ and $$N_0(T)$$ at $$T=\Im\left(\rho_{127}\right)+\epsilon$$. Note $$g_{126}$$ is the first Gram point where Gram's law is violated (see Wikipedia: Gram points), and the evaluation of formula (1) for $$N_0(T)$$ illustrated in Figure (3) below corrects itself at $$T=\Im\left(\rho_{127}\right)$$.

Figure (2): Illustration of $$\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$$

Figure (3): Illustration of $$N_0(T)$$

Question: Is there an elegant exact formula for the zeta zero counting function that is practical to evaluate?

By "elegant" and "practical to evaluate" I mean a formula that has been completely derived and preferably a closed form formula that can be evaluated similar to formula (1) above. For the purposes of this question I'm not interested in complex formulas with complex integrals that have been left unevaluated such as the formula for $$N^*(T)$$ illustrated in this Math StackExchange question.

In an attempt to further clarify the source of the problem Figures (4) and (5) below illustrate the real and imaginary parts of $$\zeta\left(\frac12+i\,T\right)$$ in the neighborhood of Gram point $$g_{126}$$ and zeta zero $$\rho_{127}$$. The green dots in the two figures below represent the evaluation of $$\zeta\left(\frac12+i\,T\right)$$ at $$T=g_{126}$$ and the red dots in the two figures below represent the evaluation of $$\zeta\left(\frac12+i\,T\right)$$ at $$T=\Im\left(\rho_{127}\right)$$. The source of the problem is the brief positive transition of $$\Im\left(\zeta\left(\frac12+i\,T\right)\right)$$ at $$T=g_{126}$$ illustrated in Figure (5) below. This transition violates Grams's law and causes undesirable branches in $$\arg\left(\zeta\left(\frac12+i\,T\right)\right)$$ and $$\Im(\log\zeta(1/2+i\,T))$$. I'll note I believe that the built-in Mathematica functions all support analytic continuation.

Figure (4): Illustration of $$\Re\left(\zeta\left(\frac12+i\,T\right)\right)$$

Figure (5): Illustration of $$\Im\left(\zeta\left(\frac12+i\,T\right)\right)$$

The following four figures contain 3D plots intended to clarify the Mathematica analytic continuation of $$\log\zeta(s)$$ in the range $$\Re(s)\in (-1,3)$$ and $$\Im(s)\in (-50,50)$$.

Figure (5): 3D Plot of $$|\log\zeta(s)|$$

Figure (6): 3D Plot of $$\Re(\log\zeta(s))$$

Figure (7): 3D Plot of $$\Im(\log\zeta(s))$$

Figure (8): 3D Plot of $$\arg(\log\zeta(s))$$

• how do you define $\frac{\Im(\log\zeta(1/2+i\,T))}{\pi}$? This (in the standard definition $S(T)$ is a piecewise smooth function that is unbounded (has jumps at ordinates of zeroes of RZ and is smoothly decreasing in between them) Feb 23, 2021 at 23:14
• @Conrad I evaluated this term using the standard definition of these functions. If a non-standard definition of these functions is required to evaluate $S(T)$, where is the formula defined for the non-standard definition of these functions required to evaluate $S(T)$? Feb 23, 2021 at 23:32
• what is the standard definition you use? the one used in all papers/textbooks is by analytic continuity on the segment $2 \to 2+it \to 1/2+it$ where $\arg \zeta(2)=0$ as long as $t$ is not a zero ordinate and then at a zero ordinate it is either the left limit or the average; the Karatsuba Korolev survey The Argument of the Zeta Function is a great reference; Riemann Mangoldt, for example, uses (and requires) this defintion Feb 23, 2021 at 23:36
• I'm talking about the globally standard definitions of $\zeta(s)$ and the $\log$ and $\Im$ functions, whereas you're talking about standard definitions in the context of $S(T)$ which apparently are different than the globally standard definitions. Feb 23, 2021 at 23:40
• not sure what is the global definition of $\log \zeta$ in the critical strip where it has many branch points at the RZ zeroes Feb 23, 2021 at 23:40

## 1 Answer

Your edit shows that Mathematica is just taking $$\arg \zeta(s)$$ in $$(-\pi,\pi)$$. The obtained function doesn't have good analytic properties, it is isn't what we need for $$N(T)$$ (the non-trivial zeros counting function).

What we need, the standard definition of $$\arg \zeta(s)$$. (ie. the one you'll find in every books and articles, except the cranks ones)

We start with $$\log \zeta(s)$$ analytic for $$\Re(s)>1$$ and $$\log \zeta(2)=\ln \pi^2/6>0$$ (the Dirichlet series $$\sum_{p^k} \frac{p^{-sk}}{k}$$), because $$\zeta(s)$$ has some poles and zeros, the analytic continuations to larger domains depend on which path we are doing it (rotating around $$s=1$$ will subtract $$2i\pi$$). To get a direct connexion to $$N(T)$$ we choose to make $$\log \zeta(s)$$ analytic on horizontal lines (thus on horizontal strips) not containing a zero/pole. And mathematica is doing something different, that you have to decipher.

Is it clear to you?

We choose this definition for $$\log \zeta(s)$$ because with $$C$$ a contour enclosing the zeros up to height $$T$$ we have by the residue theorem (the argument principle) and the symmetry around $$\Re(s)=1/2,\Im(s)=0$$: $$N(T)=\frac1{4i\pi}\int_C \frac{\xi'(s)}{\xi(s)}ds=\Re(\frac1{i\pi}\int_2^{2+iT}+ \int_{2+iT}^{1/2+iT} \frac{\xi'(s)}{\xi(s)}ds)$$ the RHS is $$=\frac1{\pi}\Im \log \xi(1/2+iT)$$ under the above analytic continuation scheme. Then $$\frac1\pi\Im \log \xi(1/2+iT)$$ decomposes as $$1+\vartheta(T)/\pi+\frac1\pi\Im \log \zeta(1/2+iT)$$

The asymptotic of $$\vartheta(T)/\pi$$ is found from Stirling (it is $$\sim \frac{T}{2\pi} \log T$$), and from Jensen's formula we get that $$\frac1\pi\Im \log \zeta(1/2+iT)=O(\log T)$$.

• Comments are not for extended discussion; this conversation has been moved to chat. Mar 2, 2021 at 12:58