Series with Binomial-Like Coefficients for Evaluation and 3D Visualization of Zeta Functions

In this paper, we continue the study of efficient algorithms for the computation of zeta functions on the complex plane, extending works of Coffey, Šleževičienė and Vepštas. We prove a central limit theorem for the coefficients of the series with binomial-like coefficients used for evaluation of the Riemann zeta function and establish the rate of convergence to the limiting distribution. An asymptotic expression is derived for the coefficients of the series. We discuss the computational complexity and numerical aspects of the implementation of the algorithm. In the last part of the paper we present our results on 3D visualizations of zeta functions, based on series with binomial-like coefficients. 3D visualizations illustrate underlying structures of surfaces and 3D curves associated with zeta functions.


Introduction
Zeta functions are very important, playing a pivotal role in the analytic number theory. Properties of zeta functions are essential in the distribution of primes. Prime numbers, in turn, have a broad spectrum of applications, ranging from quantum mechanics to information security (e.g. RSA and the Diffie-Hellman key exchange algorithms or elliptic-curve cryptography). Investigating zeta functions numerically, one needs an algorithm enabling to effectively compute numerous values over the complex plane, not only in the critical strip or on the critical line.
In this paper, we continue the study of efficient algorithms for the computation of zeta functions, extending works of Borwein (2000), Šleževičienė (2004), Vepštas (2008) and Coffey (2009). These algorithms allow the computation of zeta functions over the complex plane. The idea of the method comes from the alternating series convergence and properties of Chebyshev polynomials. The algorithm is nearly optimal in the sense that there is no sequence of n-term exponential polynomials that can converge to a zeta function very much faster than those of the algorithm (see, e.g. Theorem 3.1 in Borwein, 2000, Theorem 5 in Šleževičienė, 2004. The algorithm steps aside for the Riemann-Siegel formula based algorithms (Arias de Reyna, 2011) for computations concerning zeroes on the critical line, where multiple low precision evaluations are required. However, it is more efficient than Euler-Maclaurin based algorithms for arbitrary precision computations (note that the Riemann-Siegel formula permits to approximate ζ(σ + it) in the critical strip for large values of t with a number of terms proportional to √ t, while Euler-Maclaurin based algorithms require a number of terms proportional to t, cf. Borwein et al., 2000;Borwein, 2000). Belovas obtained central (Belovas, 2019a) and local (Belovas, 2019b) limit theorems, which allowed to introduce an asymptotic approximation for coefficients of the algorithm, providing a considerable speedup in calculations (Belovas and Sakalauskas, 2018).
In the present study, we develop a modification of a globally convergent series for the Riemann zeta function and establish a limit theorem for coefficients of the modified series. We specify the rate of convergence to the limiting distribution, identify the error term and discuss computational complexity. The algorithm is applied to produce 3D visualizations, illustrating underlying structures of surfaces and 3D curves associated with zeta functions.
The paper is organized as follows. The first part is the introduction. In the second part, we introduce a modification of Lerch's series. In the auxiliary third part, we establish double ordinary and double semi-exponential generating functions for coefficients of the modified series. The proof of the validity of the modification is presented in the fourth section. In the fifth part of the research, we establish analytic expressions of coefficients of the series. In the sixth section, we establish a limit theorem for coefficients and specify the rate of convergence to the limiting distribution. In the seventh section, we prove a theorem for the error term of the series and consider the computational complexity of the method. The numerical aspects of the technique are discussed in the eighth part of the paper. The ninth section of the study is devoted to 3D visualizations of zeta functions and the Riemann hypothesis.
Throughout this paper, we denote by (x) the cumulative distribution function of the standard normal distribution, and by (x) we denote the corresponding tail distribution (x) = 1 − (x). E(X) stands for the expected value of a random variable X. (s) denotes the gamma function. C k n are the binomial coefficients.
x and x stand for the floor function and the ceiling functions respectively. A×B stands for the Cartesian product of two sets A and B. All limits, unless specified, are taken as n → ∞.

Series with Binomial-Like Coefficients
Let s = σ + it be a complex variable. The Riemann zeta function is defined by for σ > 1, and by analytic continuation elsewhere except for a simple pole at s = 1. Let us consider a globally convergent series with binomial-like coefficients for the Riemann zeta function. here Coefficients a nk satisfy a class of triangular arrays and are defined by the following recurrent expression: for n, k ∈ N, a nk = a n−1,k−1 + a n−1,k , where a 00 = 1, a nk = 0 if n < k, and a n0 = 2a n−1,0 + 1 if n > 0 (cf. Table 1).
It is significant to note that though the partial difference equation (3) bears a close resemblance to the partial difference equation of the binomial coefficients, coefficients a nk are not symmetric, because of different boundary conditions. Indeed, the coefficients are decreasing by k for any fixed n. In order to investigate the underlying structure of these numbers, we introduce the double ordinary and the double semi-exponential generating functions (this aspect will be dealt in detail in Section 3).
The series (1) is a modification of the globally convergent series for the Riemann zeta function, first given by Lerch (1897), Borwein studied a similar series with binomial-like coefficients, rapidly convergent and well-suited for high precision numerical calculations (Borwein, 2000;Belovas and Sakalauskas, 2018) introduced an improved version of his algorithm. Vepštas (2008) and Coffey (2009) developed efficient algorithms for Hurwitz zeta function, while Šleževičienė (2004) adapted Borwein's result for Dirichlet L-functions. These algorithms, using series with binomial-like coefficients, are nearly optimal in the sense that there is no sequence of n-term exponential polynomials that can converge to the Riemann zeta function on an interval much faster that those of the algorithms (cf. Theorem 3.1 in Borwein, 2000 andTheorem 5 in Šleževičienė, 2004). In present paper we extend the study of this class of algorithms. We begin by examining the generating functions of the coefficients of the series (1).

Generating Functions of the Coefficients of the Series
In this section we establish the double ordinary generating function a nk x n y k (5) and the double semi-exponential generating function a nk x n n! y k = ∞ n=0 n k=0 a nk x n n! y k for the coefficients (3). First we will prove an auxiliary lemma for the boundary generating functions.
Lemma 1. Coefficients a nk have the boundary ordinary generating function G 0 (x) and the boundary exponential generating function F 0 (x) as follows: Proof. Let us consider the formal series (5) of the double ordinary generating function (note that a nk = 0 for n < k), Hence, the boundary ordinary generating function equals Thereby, statement (i) of the lemma follows. Next, take a look at the formal series (6) of the double semi-exponential generating function, a nk x n n! y k .
Thus, the boundary exponential generating function equals Differentiating, we receive and, as a result, the linear differential equation Solving the ordinary differential equation, we obtain statement (ii) of the lemma.
Lemma 2. Coefficients a nk have the double ordinary generating function G(x, y) and the semi-exponential generating function F (x, y) as follows: Proof. Let us take the double ordinary generating function (5). Substituting the expression (3) into the generating function, we get Thus, By substituting (7) into (11) we obtain statement (i) of the lemma. Next, turn to the double semi-exponential generating function (6). Substituting the recurrent expression (3) into the generating function, we have that Therefore, by statement (ii) of Lemma 1, we obtain that Calculating the partial derivative by x, we get the first-order linear partial differential equation, with the initial condition F | x=0 = 1. Indeed, by (6), we get a nk x n n! y k x=0 = 1.
Solving the partial differential equation (note that we can solve it as an ordinary one), we obtain statement (ii) of the lemma.

Analytic Expressions of the Coefficients of the Series
The recurrent formula (3) is often inconvenient in practical computations, thus it is purposeful to seek an analytic expression or an asymptotic expansion. We may view (3) as a partial difference equation with constant coefficients. In this section we will establish analytic expressions for the coefficients a nk , using the double ordinary and the semiexponential generating functions from (see Lemma 2). The coefficients a nk can be expressed by linear combinations of binomial coefficients or by the incomplete beta function.
Here I x (a, b) stands for the regularized incomplete beta function: Proof. Formal Taylor series in two variables for generating functions G(x, y) and F (x, y), defined by formulas (5) and (6), are equal to ∂ n+k ∂x n ∂y k F (x, y) (0,0) x n y k n!k! , respectively. Statements (i) and (ii) of the lemma are obtained by partial differentiation of the generating functions at (0, 0). By proposition (i) of Lemma 2, we have that Next, using proposition (ii) of Lemma 2, we get The third statement of the lemma follows from the formula for the distribution of the probabilities in the Bernoulli scheme (see (19) on page 27 in Bolshev and Smirnov, 1983), Substituting p = 1/2, n = r + 1 and m = j + 1, we have that Thus (cf. (13)), concluding the proof.
Remark 1. The first and the second statements of Lemma 3 also can be proved by the direct application of the definition (3) (or by induction). However, these approaches do not reveal the underlying nature of the numbers a nk .
Now we can proceed with the proof of Theorem 1.

Proof of Theorem 1
Proof. Consider Lerch's series (4) for the Riemann zeta function Changing the order of the summation in the double sum and applying the first statement of Lemma 3 (12), we obtain that yielding us the statement of the theorem.

Limit Theorem for the Coefficients of the Series and the Rate of Convergence to the Limiting Distribution
We will use Hwang's result on convergence rates in central limit theorems for combinatorial structures (see Theorem 7 and Corollary 2 in Section 4 in Hwang, 1998) to establish the limit theorem for q nk coefficients and specify the rate of convergence to the limiting distribution.
Theorem 2. (See Hwang, 1998.) Let P n (z) be a probability generating function of the random variable n , taking only non-negative integral values, with mean μ n and variance σ 2 n . Suppose that, for each fixed n 1, P n (z) is a Hurwitz polynomial. If σ n → ∞, then n satisfies Let us formulate a central limit theorem.
Lemma 4. Suppose that F n (x) is the cumulative distribution function of the random variable A n with the probability mass function and variance Then it holds Proof. Let us consider the moment generating function of the random variable A n M n (s) = E e sA n = k P (A n = k)e ks = n k=0 C k n+1 e ks 2 n+1 − 1 Calculating the derivatives of M n (s), we obtain that M n (s) = n + 1 2 n+1 − 1 e s + 1 n e s − e s(n+1) , M n (s) = n + 1 2 n+1 − 1 n e s + 1 n−1 e 2s + e s + 1 n e s − (n + 1)e s(n+1) . Hence, granting us with estimates for the mean and the variance (cf. (16) and (17)). Note that σ n → ∞.
Next, let us examine the probability generating function of the random variable A n Hurwitz polynomial is a polynomial whose zeros are located in the left half-plane of the complex plane or on the imaginary axis. Let us locate the roots of the polynomial (19). Since z = 0, we have that z + 1 z n+1 = 1.
Thus, the roots of (19) are equal to The real part of every root is negative. Hence, the probability generating function P n (z) is a Hurwitz polynomial. By Theorem 2, we have that yielding us the statement of the lemma. Now we can formulate the central limit theorem for the coefficients q nk .

Theorem 3. Under conditions of Lemma 4, the coefficients q nk satisfy
Proof. Note that the cumulative distribution function of the random variable A n equals F n (σ n x + μ n ) = j σ n x+μ n C j n+1 2 n+1 − 1 .
Denoting k = σ n x + μ n and taking into account Lemma 4 and the equality (cf. (13)) Thus, , and the statement of the theorem follows.

Error Term of the Series and the Computational Complexity
Let us investigate the error term of the series (1).
Proof. By (2.3) of Algorithm 1 in Borwein (2000), the error term of the series equals By the definition of the coefficients of the series and the expression of the generating function of the binomial coefficients, the polynomial p n+1 (x) equals Thus, p n+1 (−1) = 2 n+1 and, for 0 < x < 1, we have 0 < p n+1 (x) < 1. It follows For the integral factor, we have that The product representation of the gamma function equals The product representation of the hyperbolic sine equals Combining (26) and (27), we get Next, combining (24), (25) and (28), we obtain that yielding us the statement of the theorem.
Remark 2. For σ > 0 and s = 1 + 2iπm/ log 2, m ∈ Z, the inequality holds. Hence, to compute the Riemann zeta function with d decimal digits of accuracy, the approach requires a number n of terms in the sum (21), Noticing that (cf. 8.328.1, Gradshteyn and Ryzhik, 2014), we obtain, for fixed d and σ , that For numerical purposes (if t is large enough, e.g. t > 0.2), we can choose n by the following approximate formula Here

Numerical Aspects
Apart from a certain theoretical interest, the representation (20) of q nk is pivotal in numerical applications of the series (1), providing a considerable speedup in calculations. It relieves the computer memory, circumvents the computation of the binomial coefficients (i.e. time-consuming calculations of factorials). It allows us to cut the tails of the series. We do not to calculate q nk while k → 0 and q nk → 1, and do not include corresponding terms into the sum, while k → n and q nk → 0. The process is controlled by choosing the accuracy level ε. For the right tail, we have ((k − μ n )/σ n ) > 1 − ε. Solving the inequality we obtain that For the left tail, we have n 0 = μ n − z 1−ε σ n . Here z p is the quantile function of the standard normal distribution. The algorithm requires a number of terms n (32) to compute ζ(s) with d decimal digits. However, the use of the asymptotic, proposed in Theorem 3, or analytic expression (iii) of Lemma 3, allows us to select n adaptively, depending on accuracy required and t given. This implies that there is no need to recalculate coefficients with every new s.
Naturally, a direct application of the recurrent equation (3) (if values are stored) is faster, compared to straightforward repeated recalculations. However, this storageintensive approach is unattractive (note order of n 2 storage).
In Table 2 we compare the performance of six modifications of the algorithm for the computation of the Riemann zeta function, based on the series with binomial-like coefficients. Namely, • Recurrent Expression (RE). The coefficients of the series (21) are calculated using the recurrent expression (3). The number of terms n in the sum is obtained by applying the approximation (33). • Beta function (BF). The coefficients of the series (21) are calculated using the regularized incomplete beta function (see (iii) of Lemma 3). The number of terms n in the sum is obtained by applying the approximation (33). • Normal approximation (NA). The coefficients of the series (21) are calculated using the asymptotic (20). The standard normal cumulative distribution function is approximated with a 16-digit precision using the fast computation algorithm proposed by (West, 2005). The number of terms n in the sum is obtained by applying the approximation (33). • Recurrent Expression with n 1 (REn 1 ). The coefficients of the series (21) are calculated using the recurrent expression (3) and the number of terms n 1 (34) in the sum. • Beta function with n 1 (BFn 1 ). Coefficients of the series (21) are calculated using the regularized incomplete beta function (see (iii) of Lemma 3) and the number of terms n 1 (34) in the sum.
• Normal approximation with n 1 (NAn 1 ). Coefficients of the series (21) are calculated using the normal approximation (20) and the number of terms n 1 (34) in the sum.
We can see that asymptotic-based modifications are 2-3 times faster than beta-based modifications, while recurrence-based modifications have proved too computationally demanding for intensive practical use. Note that C++ version of the program would bring more substantial benefits in speedup (cf. Belovas and Sakalauskas, 2018). Numerical experiments have shown that processing 3D visualizations of surfaces and curves, associated with zeta functions, the performance comparable with Zetafast algorithm (Fischer, 2017), while the specified accuracy level does not exceed six decimal digits of accuracy and the coefficients q nk for a mesh are precalculated.

3D visualizations of Zeta Functios
Visualizing a complex function of a complex variable f C : C → C we have to bear in mind that actually we are faced with a mapping of a 2D subspace to another 2D subspacean essentially four-dimensional problem f R : R 2 → R 2 . There are a lot of ways of using three dimensions to handle a 4D-structure. We can colour a complex function of a complex variable according to the argument of the function, with the height representing the modulus of the function. We have tried this approach and have found the visualizations unappealing. Our goal is to provide a clear visualization of underlying structures of surfaces and 3D curves associated with zeta functions. Hence, we emphasize on the visualization of 3D intersection lines between the real (ζ ) and the imaginary (ζ ) surfaces of a zeta function, along with 2D lines of intersection between the real (ζ ) and the imaginary (ζ ) surfaces of a zeta function with the complex plane. We apply the aforementioned algorithms to obtain illustrations, disclosing the placement of zeroes of a zeta function under consideration, and as a result, enabling us to probe a hypothesis concerning the distribution of zeroes visually. All graphs of zeta functions presented in this work are generated using the normal approximation (NAk 0 ) of the coefficients q nk . This algorithm is chosen as the fastest.
The first two figures present two examples of 3D visualizations of the pattern of the allocation of non-trivial zeros of the Riemann zeta function. Figure 1 illustrates the initial allocation (for (σ, t) ∈ (−1/2, 3/2) × (10, 35)). The first five non-trivial zeros are indicated by cyan globes at the points of intersections of the real surface of the Riemann zeta function (yellow surface), the imaginary surface of the Riemann zeta function (red surface) and the critical line σ = 1/2. Figure 2 visualizes a segment of the pattern, containing 91-100th non-trivial zeroes of the Riemann zeta function (for (σ, t) ∈ (−1/2, 3/2) × (10, 35). The height is cut   at the level of | ζ(s)| 5 and | ζ(s)| 5). Note close pairs of zeroes, resembling Lehmer's phenomenon (a set of pairs of zeros of the Riemann zeta function, that are close to each other) (Stopple, 2017). It is an unsolved problem, whether there exist infinitely many Lehmer pairs. Figure 3 shows numerous ridges shaped by the real (yellow) and the imaginary (red) surfaces of the Riemann zeta function (for (σ, t) ∈ (−40, 10) × (−20, 100)). The height  is cut at the level of | ζ(s)| 5 and | ζ(s)| 5. Note the peak at the point of a simple pole s = 1. Non-trivial zeros are indicated by small cyan balls. Trivial zeros are indicated by green ones. Figure 4 extends the visualization of the previous illustration, demonstrating a 2D pattern of intersections of the real and the imaginary surfaces of the Riemann zeta function with the complex plane. Non-trivial zeros are indicated by small cyan balls. Trivial zeros are indicated by green ones. Figure 5 shows a pattern of intersections of the real (yellow) and the imaginary (red) surfaces of the Riemann zeta function (for (σ, t) ∈ (−40, 10) × (−20, 100)). The height was cut at the level of | ζ(s)| 50 and | ζ(s)| 50. 3D intersection lines between the real and the imaginary surfaces of the Riemann zeta function are highlighted (bold black). Figure 6 extends the visualization of the previous illustration, revealing a knot of 3D curves corresponding the intersections of the surfaces, while the surfaces themselves are not shown. Figure 7 presents a visualization of the Riemann hypothesis. We can see ribs, formed by the intersections of the real and the imaginary surfaces of the Riemann zeta function, going through the critical line (red) in the critical strip 0 < σ < 1 (green) at non-trivial zero points (cyan balls).  The next visualizations present a counterexample to a "generalized Riemann hypothesis". Let us consider the linear combination of the Riemann zeta function and the Dirichlet L-function (cf. Garunkštis and Šimėnas, 2015), where τ ∈ [0, 1] and L(s, χ) is the Dirichlet L-function (χ mod 5, χ(2) = −1). Hence, By the joint universality theorem for Dirichlet L-functions, it follows that for any 0 < τ < 1 there are infinitely many zeros of f (s, τ ) in the strip 1/2 < σ < 1 (see Theorem 2 by Kaczorowski and Kulas, 2007).
Let us go with τ = 3/4. The 3D visualization in Fig. 8 shows the pattern of intersections of the real (yellow) and the imaginary (red) surfaces of the linear combination (35) (for (σ, t) ∈ (−1, 2) × (1.65, 1.95)).    (35)) with the complex plane in the critical strip 0 < σ < 1 (while the surfaces themselves are not shown). We can see two pairs of intersections in the critical strip (green) not belonging to the critical line (blue).

I. Belovas
was awarded the doctor of physical science degree at Vilnius Gediminas Technical University and the Institute of Mathematics and Informatics in 2004. At present, he is a senior researcher at Vilnius University Institute of Data Science and Digital Technologies and an associate professor at Vilnius Gediminas Technical University at the Department of Mathematical Modelling. His research interests include the problems of mathematical modelling and number theory.
M. Sabaliauskas was awarded the doctor of technical sciences degree at Vilnius University in 2017. At present, he is an assistant professor at Vilnius University Institute of Data Science and Digital Technologies. His research interests include the problems of 3D visualization.