Abstract
Many special functions and analytic constants allow for a probabilistic representation in terms of inverse moments of [0, 1]-valued random variables. Under this assumption, we give fast computations of them with an explicit upper bound for the remainder term. One of the main features of the method is that the coefficients of the main term of the approximation always contain negative binomial probabilities which, in turn, can be precomputed and stored. Applications to the arctangent function, Dirichlet functions and their nth derivatives, and the Catalan, Gompertz, and Stieltjes constants are provided.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Series acceleration is a widely investigated problem in the literature which dates back to the times of Euler and Stirling. Many different methods to accelerate the speed of convergence of a series have been given; a few of them will be discussed in Sect. 3 when considering particular examples.
In this paper, we propose a new method close in spirit to the linear acceleration methods for alternating series developed by Cohen et al. [1], Borwein [2], and Coffey [3], among other authors. Such a method is based on the fact that many special functions and analytic constants allow for a probabilistic representation in terms of quantities of the form
where \(\mathbb {E}\) stands for mathematical expectation, U is a random variable taking values in [0, 1], and g is a bounded measurable function defined in this interval.
As we will see in Theorem 2.2 in Sect. 2, the proposed method computes (1.1) by means of a sum of k terms with an explicitly bounded remainder term of the order of \((t/(t+2))^k\). From a computational point of view, it may be of interest to point out that given a series of the form
it is not only important that the geometric rate r be as small as possible, but also that the coefficients f(n) be easy to compute, since such a series can also be written as
thus improving the geometric rate from r to \(r^2\), but at the price of complicating the coefficients. Of course, this procedure can be successively applied. Regarding this kind of considerations, one of the main features of our method is that the coefficients of the main term of the approximation always involve point or tail negative binomial probabilities which, in turn, can be precomputed and stored, as done in many statistical packages. Another interesting feature is that we can give simple sufficient conditions to obtain rational approximations (see the comments following Theorem 2.2).
The paper is organized as follows. In Sect. 2, we consider the negative binomial process and give a geometric bound for its tail probabilities to state our main result (Theorem 2.2), which consists of the computation of (1.1). Section 3 is devoted to applications. Actually, we give fast computations of the arctangent function, Dirichlet functions and their nth derivatives, and the Catalan, Gompertz and Stieltjes constants. In each case, a brief comparative discussion with other methods and results in the literature is provided.
2 The Main Result
Denote by \(\mathbb {N}\) the set of positive integers and by \(\mathbb {N}_0=\mathbb {N}\cup \{0\}\). Let \(t>0\). Recall (cf. Çinlar [4, pp. 279–282]) that the negative binomial process \((X_\alpha (t))_{\alpha \ge 0}\) is a stochastic process starting at the origin, having independent stationary increments and right-continuous nondecreasing paths, and such that, for any \(\alpha >0\), the random variable \(X_\alpha (t)\) has the negative binomial distribution with parameters \(\alpha \) and success probability \(1/(t+1)\), that is
Note that, for any \(v\in \mathbb {R}\) with \(|v|<(t+1)/t\), we have
The following estimate of the tail probabilities of \(X_\alpha (t)\) will be needed.
Lemma 2.1
Let \(\alpha , t>0\). For any \(k\in \mathbb {N}\), we have
where
and \(H_k\) is the kth harmonic number.
Proof
Suppose first that \(0<\alpha \le 1\). Using the inequality \(1-x\le e^{-x}\), \(0\le x\le 1\), we have from (2.1)
This readily implies the result in this case. Suppose now that \(\alpha >1\). Let \(\theta >0\) be such that
Using (2.2) and Chebyshev’s inequality (cf. Petrov [5, p. 54–58 ], we have
Choose in (2.5) the value of \(\theta \) minimizing the exponent, that is,
Observe that this value satisfies (2.4). We, therefore, have from (2.5) and (2.6)
Note that
We finally obtain from (2.3), (2.7), and (2.8)
This completes the proof. \(\square \)
Let \(g:[0,1]\rightarrow [-1,1]\) be a measurable function. Having in mind the constants defined in (2.3), we state our main result.
Theorem 2.2
Let U be a random variable taking values in [0, 1] and \(\alpha , t>0\). For any \(k\in \mathbb {N}\), we have
where
Proof
Let \(u\in [0,1]\). Replacing v by \(1-2u\) and t by t/2 in (2.2), we get
Denote by
Since \(\max (|g(u)|,|1-2u|)\le 1\), we have from (2.11) and (2.12)
where the last inequality follows from Lemma 2.1. On the other hand, using the combinatorial identity
we can rewrite (2.12) as
Hence, the conclusion follows by replacing u by the random variable U in (2.12), (2.13), and (2.14), and then taking expectations. \(\square \)
With respect to Theorem 2.2, some remarks are in order. First, the negative binomial probabilities in (2.10) do not depend upon the random variable U, and therefore can be precomputed to evaluate any special function or analytic constant of form (1.1). Second, in may usual cases, we find \(g(U)=U^m\), for some \(m\in \mathbb {N}_0\). This implies that the approximants in (2.10) are rational, whenever \(\alpha \), t and the moments \(\mathbb {E}U^j\), \(j\in \mathbb {N}\), are rational, too. Third, formula (2.10) gives us two alternative ways to compute the main term of the approximation. In each particular example, we are free to choose that providing us the simplest expression.
Finally, the binomial expansion
is only a formal power series, unless \(0<t\le 1\). In many of the examples considered in the following section, we find \(t=1\). In such a case, the series in (2.15) has a poor rate of convergence. By the second expression in (2.10), if we multiply the jth term in (2.15) by the probability \(P(X_{\alpha +j}(1/2)+j\le k-1)\), \(j=0,1,\ldots ,k-1\), we obtain an approximation at the geometric rate 1/3. As follows from (2.1), such probabilities decrease from \(P(X_\alpha (1/2)\le k-1)\) to
This decreasing property follows from the general fact that the negative binomial process has nondecreasing paths, which implies that
and therefore
3 Applications
In this section, we apply Theorem 2.2 to obtain fast computations of various different analytic functions and constants. In each case, we use the simplest expression of the approximant in (2.10).
3.1 The Arctangent Function
This function can be represented as
where U is a random variable uniformly distributed on [0, 1].
Corollary 3.1
Let \(t\in \mathbb {R}\). For any \(k\in \mathbb {N}\), we have
where
Proof
In view of (3.1), it suffices to apply Theorem 2.2 with \(\alpha =1\), \(g(x)=1\), \(0\le x\le 1\), replacing tU by \((tU)^2\), and using the first expression in (2.10). In this last respect, note that
\(\square \)
Euler’s classical formula for the arctangent function (see Chien-Lih [6] for a short proof of it) reads as
Observe that the geometric rate of convergence given in Corollary 3.1 is slightly better than that in (3.2). As a counterpart, the coefficients of the main term of the approximation in Corollary 3.1 are slightly more involved than those in (3.2).
3.2 Dirichlet Functions
For any \(a>0\), we consider the Dirichlet function
For any \(s>0\), let \(X_s\) be a random variable having the gamma density
Observe that the Laplace transform of \(X_s\) is given by
We can therefore represent the Dirichlet function as
Since \(X_s\rightarrow 0\), a.s., as \(s\rightarrow 0\), this representation readily implies that \(\eta _a(0)=1/2\).
Corollary 3.2
Let \(a>0\) and \(s\ge 0\). For any \(k\in \mathbb {N}\), we have
Proof
Starting from (3.5), it is enough to apply Theorem 2.2 with \(\alpha =t=1\), \(g(x)=1\), \(0\le x \le 1\), and \(U=e^{-aX_s}\). The result follows using the second representation of the main term in (2.10) and taking into account that \(C_1(1/2,k)=1\) and
as follows from (3.4). \(\square \)
Note that Corollary 3.2 gives us a uniform approximation in \(s\ge 0\) of the Dirichlet function at the geometric rate 1/3. On the other hand, this result also provides a fast computation of the Catalan constant \(\kappa =\eta _2(2)\).
Integral representations for the Lerch transcendent function, which includes \(\eta _1(s)\) and \(\eta _2(s)\) as particular cases, were obtained by Guillera and Sondow [7]. Borwein [2] gave various efficient algorithms to compute \(\eta _1(s)\) for complex numbers s with \({\mathcal {R}}(s)>c\), for some \(c\in \mathbb {R}\), at geometric rates \(1/(3+\sqrt{8})\) or 1/4, depending on the algorithm. Using the Markov–Wilf–Zeilberger method, Hessami Pilehrood and Hessami Pilehrood [8] produced fast convergent series for \(\eta _2(2n+1)\), \(\eta _2 (2n+2)\), and \(\eta _2 (2n+3)\), \(n\in \mathbb {N}_0\). In particular, these authors showed that the Catalan constant can be computed by the following convergent series at the geometric rate \(2^{-10}\):
q(n) being a polynomial of degree 6.
3.3 Derivatives of Dirichlet Functions
The nth derivative of \(\eta _a (s)\) is given by
To give a probabilistic representation of such derivatives, we will need the following two ingredients. In the first place, recall that the Stirling numbers of the second kind S(n, m) are defined by
where \((x)_m\) is the falling factorial, i.e., \((x)_m=x(x-1)\cdots (x-m+1)\), \(m\in \mathbb {N}\) (\((x)_0=1\)).
Lemma 3.3
Let \(0\le r<1\). For any \(n\in \mathbb {N}\), we have
Proof
From (3.7), we see that
where the last equality follows by choosing in (2.2) \(v=-1\), \(\alpha =m+1\), and \(r=t/(t+1)\). \(\square \)
In the second place, let U and T be two independent random variables, such that U is uniformly distributed on [0, 1] and T has the exponential density \(\rho _1(\theta )\) defined in (3.3). Denote by \((U_k)_{k\ge 1}\) and \((T_k)_{k\ge 1}\) two sequences of independent copies of U and T, respectively, both of them mutually independent. Set
Since U and T are independent, we have from (3.4)
thus implying that
Assume that \(W_n\) and \(X_s\), as defined in (3.3), are independent and define the (0, 1)-valued random variable
The following auxiliary result provides a probabilistic representation of \(\eta _a^{(n)}(s)\).
Lemma 3.4
Let \(a,s>0\). For any \(n\in \mathbb {N}\), we have
Proof
Using (3.4), (3.9), (3.10), and the independence of the random variables involved, we have
where, in the last equality, we have applied Lemma 3.3 with \(r=V\). \(\square \)
As in the preceding example, by setting \(s=0\) in Lemma 3.4, we obtain a closed form expression for \(\eta _a^{(n)}(0)\). For instance, it follows from (3.10) that:
We are in a position to give fast computations of \(\eta _a^{(n)}(s)\).
Corollary 3.5
Let \(a>0\), \(s\ge 0\), and \(n\in \mathbb {N}\). For any \(k\in \mathbb {N}\), we have
where
Proof
We apply Theorem 2.2 with \(t=1\), \(\alpha =m+1\), and \(g(x)=x^m\), and use the second expression in (2.10) for the main term of the approximation to obtain
where the last equality follows from (2.3). By (3.4), (3.9), and the independence of the random variables involved, we have
This, together with (3.12) and Lemma 3.4, shows the result. \(\square \)
As in Corollary 3.2, Corollary 3.5 gives a uniform approximation in \(s\ge 0\) of \(\eta _a^{(n)}(s)\) at the geometric rate 1/3. For large values of k, the bound \(D_a(n,k)\) in (3.11) grows as a polynomial in k of degree \(n+1\). We finally point out that fast computations of \(\eta _a^{(n)}(s)\) at the geometric rate 1/3, with more involved coefficients in the main term of the approximation, were obtained in [9] using some differentiation formulas for the gamma process..
3.4 The Gompertz Constant
This constant is the value of several improper integrals, such as
A series representation of G is given by (cf. Mezö [10])
where \(\gamma \) is Euler’s constant. It turns out that the integral on the right-hand side in (3.13) can be written as
where \(m\in \mathbb {N}_0\) and \(\lambda _i=2^i\), \(i\in \mathbb {N}_0\). Formula (3.15) follows by induction after noting that, with the change \(x=2u+1\), we have for any \(\lambda >0\)
In view of (3.15), denote
The Poisson–Gamma relation (cf. Johnson et al. [11, p. 164]) states that
The following auxiliary result gives a fast computation of \(I_\lambda \).
Lemma 3.6
Let \(\lambda >0\). For any \(k\in \mathbb {N}\), we have
Proof
Let \(T_\lambda \) be a random variable having the truncated exponential density
By (3.16), we see that
On the other hand, by (3.17) and (3.18), we have for any \(j\in \mathbb {N}_0\)
Finally, applying Theorem 2.2 with \(t=1\), \(\alpha =2\), and \(g(x)=1\), \(0\le x\le 1\), and using the second expression in (2.10), we get
where the last inequality follows from (2.3). The conclusion follows from (3.19)–(3.21) and some simple computations. \(\square \)
In the following result, we give a fast computation of I, as defined in (3.15). By (3.13), this is tantamount to compute G in a fast way.
Corollary 3.7
Let \(q_j(\lambda )\) be as in (3.17) and \(\lambda _j=2^j\), \(j\in \mathbb {N}_0\). For any \(k,m\in \mathbb {N}\), such that \(2^{m+1}\ge k\log 3-2\log k\), we have
Proof
From (3.15) and (3.16), we have
Applying Lemma 3.6 to each one of the terms \(I_{\lambda _i}\), we see from (3.23) that the left-hand side in (3.22) is bounded above by
since, by assumption, \(\exp (2^{m+1})\ge 3^k/k^2\). This, together with (3.23), shows (3.22) and completes the proof. \(\square \)
Note that, for a fixed k, the number m of terms on the left-hand side in (3.22) has the order of \(\log k\), as \(k\rightarrow \infty \). We point out that Mezö [10] proved the identity
where \(C_n\) is the nth Gregory coefficient and \(\{x\}\) stands for the fractional part of x.
Using (3.14), we can obtain from Corollary 3.7 a fast, but not rational, approximation of Euler’s constant \(\gamma \). Rational approximations of \(\gamma \) are available in the literature. For instance, Hessami Pilehrood and Hessami Pilehrood [12] provided a continued fraction expansion converging subexponentially to \(\gamma \) and Prévost and Rivoal [13] used Padé approximation methods to obtain sequences approximating \(\gamma \) at a geometric rate (see also [14] for a fast rational approximation to \(\gamma \) using the standard Poisson process).
3.5 Stieltjes Constants
These constants are the coefficients \((\gamma _m)_{m\ge 0}\) in the Laurent expansion of the Riemann zeta function \(\zeta (z)\) about its simple pole at \(z=1\), that is
\(\gamma _0=\gamma \) being Euler’s constant. Nan Yue and Williams [15] (see also Coffey [3]) showed that each \(\gamma _m\) can be written as a finite sum
where \(B_n\) is the nth Bernoulli number and \(\eta _1^{(n)}(1)\) is the nth derivative of the Dirichlet function \(\eta _1(s)\) at \(s=1\), as defined in (3.6).
In view of (3.24), to evaluate \(\gamma _m\), it suffices to compute \(\eta _1^{(n)}(1)\), \(n=0,1,\ldots ,m\). This is done in Corollaries 3.2 and 3.5.
We finally mention that computations of generalized Stieltjes constants at a geometric rate of convergence have been obtained by using different methods. For instance, Johansson [16] gave efficient algorithms based on the Euler–Maclaurin summation formula, Johansson and Blagouchine [17] used complex integration, and Prévost and Rivoal [18] presented approximating sequences obtained by generalizing the remainder Padé approximants method. See also [19] for computations based on a differential calculus for the gamma process.
Data availability
It is not applicable. No information needs to be included.
References
Cohen, H., Rodriguez Villegas, F., Zagier, D.: Convergence acceleration of alternating series. Exp. Math. 9(1), 3–12. http://projecteuclid.org/euclid.em/1046889587 (2000)
Borwein, P.: An efficient algorithm for the Riemann zeta function. In: Constructive, Experimental, and Nonlinear Analysis (Limoges, 1999), Vol. 27 of CRC Mathematical Modeling Series, pp. 29–34. CRC, Boca Raton, FL (2000)
Coffey, M.W.: An efficient algorithm for the Hurwitz zeta and related functions. J. Comput. Appl. Math. 225(2), 338–346 (2009). https://doi.org/10.1016/j.cam.2008.07.040
Çınlar, E.: Probability and Stochastics, Vol. 261 of Graduate Texts in Mathematics. Springer, New York (2011). https://doi.org/10.1007/978-0-387-87859-1
Petrov, V.V.: Limit Theorems of Probability Theory, Vol. 4 of Oxford Studies in Probability. The Clarendon Press, Oxford University Press, New York (1995). (sequences of independent random variables, Oxford Science Publications)
Chien-Lih, H.: An elementary derivation of Euler’s series for the arctangent function. Math. Gaz. 89(516), 469–470 (2005). https://doi.org/10.1017/S0025557200178404
Guillera, J., Sondow, J.: Double integrals and infinite products for some classical constants via analytic continuations of Lerch’s transcendent. Ramanujan J. 16(3), 247–270 (2008). https://doi.org/10.1007/s11139-007-9102-0
Hessami Pilehrood, K., Hessami Pilehrood, T.: Series acceleration formulas for beta values. Discrete Math. Theor. Comput. Sci. 12(2), 223–236 (2010)
Adell, J.A., Lekuona, A.: Dirichlet’s eta and beta functions: concavity and fast computation of their derivatives. J. Number Theory 157, 215–222 (2015). https://doi.org/10.1016/j.jnt.2015.05.006
Mezö, I.: Gompertz constant, Gregory coefficients and a series of the logarithm function. J. Anal. Number Theory 2, 33–36 (2014)
Johnson, N.L., Kotz, S., Kemp, A.W.: Univariate Discrete Distributions, Wiley Series in Probability and Mathematical Statistics: Applied Probability and Statistics, 2nd edn. Wiley-Interscience Publication, New York (1992)
Hessami Pilehrood, K., Hessami Pilehrood, T.: On a continued fraction expansion for Euler’s constant. J. Number Theory 133(2), 769–786 (2013). https://doi.org/10.1016/j.jnt.2012.08.016
Prévost, M., Rivoal, T.: Application of Padé approximation to Euler’s constant and Stirling’s formula. Ramanujan J. 54(1), 177–195 (2021). https://doi.org/10.1007/s11139-019-00201-9
Adell, J.A., Lekuona, A.: Rational approximation to Euler’s constant at a geometric rate of convergence. Math. Comput. 89(325), 2553–2561 (2020). https://doi.org/10.1090/mcom/3528
Zhang, N.Y., Williams, K.S.: Some results on the generalized Stieltjes constants. Analysis 14(2–3), 147–162 (1994)
Johansson, F.: Rigorous high-precision computation of the Hurwitz zeta function and its derivatives. Numer. Algorithms 69(2), 253–270 (2015). https://doi.org/10.1007/s11075-014-9893-1
Johansson, F., Blagouchine, I.V.: Computing Stieltjes constants using complex integration. Math. Comput. 88(318), 1829–1850 (2019). https://doi.org/10.1090/mcom/3401
Prévost, M., Rivoal, T.: Fast convergent sequences of approximations to Stieltjes’ constants, working paper or preprint. https://hal.archives-ouvertes.fr/hal-03508294 (2022)
Adell, J.A., Lekuona, A.: Fast computation of the Stieltjes constants. Math. Comput. 86(307), 2479–2492 (2017). https://doi.org/10.1090/mcom/3176
Acknowledgements
The author is very grateful for the remarks and suggestions made by the referee.
Funding
Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
The author is supported by Research Projects DGA (E48_23R).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Adell, J.A. Series Acceleration via Negative Binomial Probabilities. Mediterr. J. Math. 20, 317 (2023). https://doi.org/10.1007/s00009-023-02511-1
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s00009-023-02511-1
Keywords
- Negative binomial process
- arctangent function
- Dirichlet function
- Catalan constant
- Gompertz constant
- Stieltjes constants