On the genesis of BBP formulas
Daniel Barsky, Vicente Mu\~noz, Ricardo P\'erez-Marco

TL;DR
This paper introduces a general, elementary method for generating and understanding BBP and BBP-like formulas for transcendental numbers, shedding light on their structure, relations, and origins.
Contribution
It provides a new elementary procedure to produce infinitely many BBP formulas, explaining their interrelations and origins, especially for $ ext{pi}$ and logarithmic constants.
Findings
Derived known BBP formulas for $ ext{pi}$
Explained relations and rearrangements among BBP formulas
Identified sources of null BBP formulas for zero
Abstract
We present a general procedure to generate infinitely many BBP and BBP-like formulas for the simplest transcendental numbers. This provides some insight and a better understanding into their nature. In particular, we can derive the main known BBP formulas for . We can understand why many of these formulas are rearrangements of each other. We also understand better where some null BBP formulas representing come from. We also explain what is the observed relation between some BBP formulas for and , that are obtained by taking real and imaginary parts of a general complex BBP formula. Our methods are elementary, but motivated by transalgebraic considerations, and offer a new way to obtain and to search many new BBP formulas and, conjecturally, to better understand transalgebraic relations between transcendental constants.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
\date
22 July 2020
On the genesis of BBP formulas
Daniel Barsky
7 rue La Condamine, 75017 Paris, France
,
Vicente Muñoz
Departamento de Algebra, Geometría y Topología, Universidad de Málaga, Campus de Teatinos, s/n, 29071 Malaga, Spain
and
Ricardo Pérez-Marco
CNRS, IMJ-PRG, Univ. de Paris, Bât. Sophie Germain, Case 7012, 75205-Paris Cedex 13, France
Abstract.
We present a general procedure to generate infinitely many BBP and BBP-like formulas for the simplest transcendental numbers. This provides some insight and a better understanding into their nature. In particular, we can derive the main known BBP formulas for . We can understand why many of these formulas are rearrangements of each other. We also understand better where some null BBP formulas representing [math] come from. We also explain what is the observed relation between some BBP formulas for and , that are obtained by taking real and imaginary parts of a general complex BBP formula. Our methods are elementary, but motivated by transalgebraic considerations, and offer a new way to obtain and to search many new BBP formulas and, conjecturally, to better understand transalgebraic relations between transcendental constants.
Key words and phrases:
pi, log(2), normal numbers, BBP formula
2010 Mathematics Subject Classification:
11K16, 11J99.
1. Introduction
More than 20 years ago, D.H. Bailey, P. Bowein and S. Plouffe ([5]) presented an efficient algorithm to compute deep binary or hexadecimal digits of without the need to compute the previous ones. Their algorithm is based on a series representation for given by a formula discovered by S. Plouffe,
[TABLE]
Formulas of similar form for other transcendental constants were known from long time ago, like the classical formula for , that was known to J. Bernoulli,
[TABLE]
The reader can find in [4] an illustration of the way to extract binary digits from this type of formulae.
Many new formulas of this type, named BBP formulas, have been found for and other higher transcendental constants in the last decades (see [1], [26]). Plouffe’s formula, and others for , can be derived using integral periods (as in [5]), or more directly using polylogarithm ladder relations at precise algebraic values (as in [10]), which can be viewed as generalizations of Machin-Störmer relations (see [24] and [25]) for rational values of the arctangent function, and taking its Taylor series expansions. In particular, we can recover in that way Bellard’s formula (see Bellard’s webpage [9]), that seems to be the most efficient one for the purpose of computation of deep binary digits of (see Remark 1.2),
[TABLE]
Many of these formulas are rearrangements of each other, or related by null BBP formulas that represent [math]. The origin of null BBP formulas is somewhat mysterious. Most of the formulas of this sort have been found by extensive computer search over parameter space using the PSLQ algorithm to detect integer relations. So their true origin and nature remainded somewhat mysterious. As the authors of [5] explain:
We found the identity by a combination of inspired guessing and extensive searching using the PSLQ integer relation algorithm.
and in [3]
This formula (1) was found using months of PSLQ computations after corresponding but simpler n-th digit formulas were identified for several other constants, including . This is likely the first instance in history that a significant new formula for was discovered by a computer.
We note also the observed mysterious numerical relation of BBP formulas for and .
For the purpose of computation of all digits of up to a certain order, there are more efficient formulas given by rapidly convergent series of a modular nature, initiated by S. Ramanujan ([23]), that are at the origin of Chudnoskys’ algorithm based on Chudnovskys’ formula (see [16])
[TABLE]
Other methods of algorithmic nature include the Borwein quartic algorithm for (see [13]) that approximately quadruples the number of correct digits with each iteration, and the Borwein nonic algorithm for that approximately yields nine-times the number of correct digits.
A general BBP formula as defined in [6] for the constant is a series of the form
[TABLE]
where , are integers, , and is an integer vector. The integer is the degree of the formula. The classical BBP formula (1) and Bellard formula (2) are of degree . We study in this article formulas of degree . It would be interesting to extend the present results to get higher degree formulas. The integer is called the base of the BBP formula, and digits in base can be computed efficiently. Particular attention has been given to base formulas, as they are useful in computing binary digits. They are called binary BBP formulas. While there are both base and base BBP formulas for some constants like (see [14]), no base formula for is known.
More generally, we can define BBP-like formulas to be of the general form
[TABLE]
where and are rational numbers. These more general BBP-like formulas have potentially similar computational applications.
But the interest of these formulas is also theoretical. A normal number in base is an irrational number such that its expansion in base contains any string of consecutive digits with frequency . These numbers were introduced in 1909 by É. Borel in an article where he proved that Lebesgue almost every number is normal in any base ([11], and the survey [22]). This result is a direct application of Birkhoff’s Ergodic Theorem to the dynamical system given by the transformation , multiplication by the base modulo , where . The transformation preserves the Lebesgue measure which is an ergodic invariant measure. It is not difficult to construct explicit normal numbers, and numbers that are not normal, but there is no known example of “natural” transcendental constant that is normal in every base. It is conjectured that this holds for and other natural transcendental constants, but this remains an open question. It is not even known if a given digit appears infinitely often in the base expansion for . We note recent results [7, 12] where the normality of certain class of constants has been proved, yet not including .
An approach to prove normality in base for any transcendental constant which admits a BBP formula in base is proposed in [6]. The criterion, named “Hypothesis A”, seems related to Furstenberg’s “multiplication by and ” conjecture (see [17]). Only a very particular class of period-like numbers have BBP formulas (for instante, as mentioned before, does). It is also natural to investigate the class of numbers with a BBP or BBP-like representation.
The main goal of this article is to present a general procedure to generate the most basic BBP and BBP-like formulas of degree that correspond to the simplest transcendental numbers and . With this new procedure we derive the classical formulas, like Bailey-Borwein-Plouffe or Bellard formulas, and understand better their origin, in particular the origin of null formulas, and the relation of BBP formulas for and that correspond to take the real or imaginary parts of the same complex formula. We also understand better the redundancy of rearrangements in these formulas, and the method provides a tool to search for more formulas with a more conceptual approach. Although we do not find new BBP formulas, we recover the most important ones and we believe that the method presented can be further developed to discover new ones. We plan to carry this out in the future.
The procedure to generate BBP formulas is elementary and is motivated by considering the bases for first order asymptotics at infinite of Euler Gamma function and higher Barnes Gamma functions and the transalgebraic considerations that play an important role in [20] (see also [19]). To construct these asymptotic bases, we consider the family iterated integrals of defined by , and for ,
[TABLE]
It is elementary to check by induction that
[TABLE]
where are polynomials with rational coefficients, with , and
[TABLE]
we have
Theorem 1.1**.**
Let , , or and . We have
[TABLE]
or
[TABLE]
Since has rational coefficients, we can take and we get a BBP-like formula for . Taking suitable complex values for , and separating real and imaginary parts, we also obtain BBP and BBP-like formulas for . We prove that formulas for different values of provide non-obvious rearrangements of the summations, which in part explains the rich “rearrangement algebra” of BBP formulas.
We recover many formulas with this procedure. For instance, all the formulas of appearing in Wikipedia [27] are given in (6)–(16). We also get the following classical formulas:
[TABLE]
Also combining our formulas we can get some null formulas representing [math], as for example the following one appearing in [5]
[TABLE]
This gives some explanations of the mysteries mentioned before. For example, formulas for and are related by taking real and imaginary parts of formulas for complex values for , for example for . Null formulas can appear when comparing our formulas for different complex values of taking real or imaginary parts. For example for and we do get the previous null formula. It is natural to ask if all null BBP formulas of degree can be obtaining combining formulas from Theorem 1.1 for different values of .
Certainly, we also recover the classical BBP formula (1) and Bellard formula (2).
Remark 1.2*.*
We can measure the efficiency of a BBP-like formula (3) for computing a number as , where is the number of non-zero coefficients in , as this measures the number of non-zero summands for going to the next step in the digit computation. Binary BBP formulas, that is when , are of special relevance, since they allow to compute in binary form. In that case, we can take the logarithm in base . The efficiency of (1) is , whereas the efficiency of (2) is , a faster.
The techniques of this article extend to other bases of iterated functions that we will discuss in future articles. We hope that our approach can be useful in finding more efficient BBP-formulas for by more powerful algebraic computer search algorithms.
Acknowledgements
We are very grateful to the anonymous referee that has made a large number of interesting suggestions to improve the exposition. We thank also Tomohiro Yamada for pointing out several corrections. The second author was partially supported by Project MINECO (Spain) PGC2018-095448-B-I00.
2. Laplace-Hadamard regularization of polar parts
The Laplace-Hadamard regularization is related to work in [19] and [20].
For each we define the polynomials , and for ,
[TABLE]
We also define the iterated primitives of defined by , and for ,
[TABLE]
We call the integrals the Laplace-Hadamard regularization or the Laplace-Hadamard transform of . The functions are holomorphic functions in and have an isolated singularity at [math] with non-trivial monodromy when . We have a single integral expression for as a Laplace-Hadamard regularization:
Proposition 2.1**.**
For and , or and , we have
[TABLE]
Proof.
For we have
[TABLE]
and by induction we get the result integrating on the variable between and ,
[TABLE]
and using that
[TABLE]
∎
Note that we have when uniformly on compact sets, and is the -th order jet of at . So for we have
[TABLE]
For we get the elementary integral
[TABLE]
For we get the old Frullani integral ([12] p.98)
[TABLE]
We have
[TABLE]
A simple induction shows
Proposition 2.2**.**
We have
[TABLE]
where are polynomials, with , and
[TABLE]
**
Regarding the polynomials , the relation shows that we have
[TABLE]
This equation with the condition determines uniquely from .
We have a formula for (see [21], where with , and [18]):
Proposition 2.3**.**
We have for ,
[TABLE]
where and are the Harmonic numbers.
Proof.
The formula holds for and it satisfies and the recurrence relation:
[TABLE]
∎
Now we prove:
Lemma 2.4**.**
For ,
[TABLE]
We first establish a useful integral representation for harmonic numbers
Lemma 2.5**.**
[TABLE]
Proof.
We have
[TABLE]
∎
From this it follows
Lemma 2.6**.**
[TABLE]
Proof.
[TABLE]
∎
Now we can prove Lemma 2.4.
Proof of Lemma 2.4..
We have
[TABLE]
∎
Corollary 2.7**.**
For ,
[TABLE]
Proof.
From (5) we have
[TABLE]
and the result follows from Lemma 2.4. ∎
This is related to the following identity with harmonic numbers:
Lemma 2.8**.**
For , we have
[TABLE]
Proof.
For , we have
[TABLE]
therefore
[TABLE]
∎
3. Egyptian formulas for rational numbers
We start with the simplest case: an Egyptian formula for rationals. The following is an “infinite Egyptian fraction decomposition” for .
Proposition 3.1** (Infinite Egyptian fraction decomposition).**
For , we have
[TABLE]
Proof.
Notice that from Proposition 2.1 we have
[TABLE]
with
[TABLE]
hence
[TABLE]
So for , we can develop and exchange the integral and the summation:
[TABLE]
Now we have from Lemma 2.4,
[TABLE]
thus
[TABLE]
and the result follows. ∎
As one referee has pointed out to us, Proposition 3.1 follows also by a telescoping sum over
[TABLE]
which is found using Gosper’s algorithm. We show here that this formula results from our general approach.
4. BBP-like formulas for
In general we have
Proposition 4.1**.**
For , or and , we have
[TABLE]
Proof.
The condition ensures the convergence of the integrals and , or and ensures the convergence of the series,
[TABLE]
∎
Remark 4.2*.*
The formula in Proposition 4.1 also holds for and , but the convergence of the sum is only conditional. This can be checked by continuity of both sides making .
Now, we have
[TABLE]
and since we get,
[TABLE]
In particular, for we have
[TABLE]
Theorem 4.3**.**
Let , or and . Then we have
[TABLE]
∎**
We get a group of formulas for by specializing at . We have
[TABLE]
Using the values , , , , , we get:
[TABLE]
Specializing at , we get the following formula for .
[TABLE]
Using the values , , , , , we get the formulas:
[TABLE]
All these formulas appear in [27].
It is customary to write the formulas above by splitting the denominators into simple fractions. For instance, the fourth formula can be written as
[TABLE]
If we group for , we get
[TABLE]
We rewrite it in more classical form:
[TABLE]
We can obtain many more binary BBP-like formulas. Specializing at we get the formula for ,
[TABLE]
For instance, gives
[TABLE]
As before, the sum can also be written as
[TABLE]
In general, binary BBP formulas can be obtained from Theorem 4.3 by taking ,
[TABLE]
Formulas of this sort are also obtained by Chamberland [15].
The numbers and , , generate a multiplicative subgroup of , and for the elements in that subgroup, we have binary BBP formulas for . The first prime that it is not in this subgroup is . Note that , but these two primes appear always together in the factor decomposition of when is a multiple of , and do not appear for other values of . Also they do not appear at all in , for any natural number . This can be checked as follows: first , so the order of in is . In particular it cannot be that , since otherwise , and hence , so and thus . On the other hand, if then is a multiple of , and then .
5. BBP-like formulas for
We may use Theorem 4.3 for a complex value of , then we can get BBP-formulas for and also for separating real and imaginary parts. For (using Remark 4.2), we have
[TABLE]
which is the classical series for . Make . We have and
[TABLE]
and
[TABLE]
Separating real and imaginary part and or we get two BBP formulas, one for and the other one for :
[TABLE]
and
[TABLE]
This last formula is just the first Machin formula for , related to
[TABLE]
For general , we take , and we have
[TABLE]
Let
[TABLE]
so that
[TABLE]
With this machinery at hand, we recover a number of known formulas.
Proposition 5.1** (Leibniz).**
We have
[TABLE]
Proof.
We apply the above to , where we have that and , thus
[TABLE]
∎
The original BBP formula from [5] reads as follows:
Theorem 5.2** (Bailey-Borwein-Plouffe).**
We have
[TABLE]
Proof.
Take , so . Using the formula for , we have
[TABLE]
Taking the imaginary part, and agroupping terms for , , we get
[TABLE]
so
[TABLE]
Similarly, by taking the real part, we get
[TABLE]
so
[TABLE]
Substracting (19) and our previous formula (17), we get a null formula
[TABLE]
(note that the term gives exactly ). Adding (18) to twice this formula, we get
[TABLE]
∎
In the proof we have proved and used the following null BBP formula that appears in [5] :
Proposition 5.3**.**
We have
[TABLE]
Null BBP formulas are very interesting and useful for rewritting BBP formulas. They are obtained by comparing BBP formulas for the same number at different values of .
Proposition 5.4**.**
We have
[TABLE]
Proof.
We use the formulas
[TABLE]
Adding the first two and substracting the third, we get
[TABLE]
and multiplying by we get the result. ∎
Finally, we include a proof of Bellard’s formula.
Theorem 5.5** (F. Bellard).**
We have
[TABLE]
Proof.
We use the following factorization
[TABLE]
and taking imaginary parts
[TABLE]
For and , we get
[TABLE]
writing , , and then .
Now take and , to get
[TABLE]
We substract twice (23) minus (22), and use that . Then we get the result. ∎
6. On the classical BBP form
As defined in [6] the classical BBP form is
[TABLE]
where are integers and is a vector of integers. The degree is and the base is . Let us check that with our formula from Theorem 4.3 we get BBP formulas of degree .
Lemma 6.1**.**
We have
[TABLE]
where for , is an integer given by
[TABLE]
Proof.
As usual, multiply by and set to get
[TABLE]
∎
We have a general reorganization Lemma that shows that any sum of BBP form with more than fractions can be reorganized into one with terms.
Lemma 6.2**.**
We have
[TABLE]
with
[TABLE]
where the sum extends over indexes such that .
Proof.
For and group the fractions of the sum modulo with . ∎
These two Lemma prove that the BBP formulas that we get from Theorem 1.1 are of type .
We can apply this reorganization to the summation in the formula from Theorem 1.1 and get (regrouping the terms with in the third equality),
[TABLE]
with . But we have
[TABLE]
Hence, we recognize in the last sum of (6) , so the formula in Theorem 1.1 for is a rearrangement of the formula for that is the classical Taylor formula for
[TABLE]
We can use this rearrangement to recover directly the formula for the polynomials directly:
[TABLE]
but
[TABLE]
and
[TABLE]
which gives after some rearrangment the expression for
Formally, there is no extra content in the formulas for the same parameter but different integers . However, these rearrangements are computationally useful, and they are not easy to produce. The iterated integrals or Proposition 2.2 gives a systematic method to find a family of such resummations. The expression in terms of combinatorical coefficients in the denominator that arise by the iterated integrals in this type of sums can present sometimes some advantages. Of course one is inmediately reminded (even if it is a formula of higher degree) of the famous Apery sum for starting point of his proof of the irrationality of this number.
Appendix. Location of the zeros of the polynomials
The application of the formula in Theorem 4.3 to roots of , in particular to real roots, gives BBP-like formulas of a special form. We study the location of the roots of and the number of real roots.
To understand the polynomials , we introduce the polynomials of degree , for , defined by
[TABLE]
so that by Proposition 2.3
[TABLE]
We list the polynomials:
[TABLE]
and accordingly,
[TABLE]
We want to locate the zeros of .
Lemma 6.3**.**
We have
[TABLE]
Proof.
The value at follows from Lemma 2.4. The value at by (27). ∎
Let
[TABLE]
The zeros of are those of and an extra zero at . Now we have two interesting equalities:
[TABLE]
and
[TABLE]
Using these equalities, we can prove the following:
Proposition 6.4**.**
For even, the polynomial has no real roots.
For odd, the polynomial has only one real root and it lies in the interval .
Proof.
We want to prove by induction that:
- •
For even, is the only (simple) zero of . And for and for .
- •
For odd, has two zeros, at some and at . And for and for .
Let be even. We want to prove that has only a zero at . Note that and , so is increasing at . For even we have everywhere.
- •
If then by induction hypothesis. By (Appendix. Location of the zeros of the polynomials ) we have , so it is increasing there. By Lemma 6.3, so there are no zeros on .
- •
If then by induction hypothesis. By (Appendix. Location of the zeros of the polynomials ) we have , so it is increasing there. As , there are no zeros on .
- •
If then . If then (Appendix. Location of the zeros of the polynomials ) says that . So is increasing at every zero. As is a zero, then this implies that there is only one zero of .
Now let be odd. We want to prove that has a zero at some and at , it is positive on and negative at . Note that and , so it is increasing at . Note that for odd we have for , and for .
- •
If then by induction hypothesis. By (Appendix. Location of the zeros of the polynomials ) we have , so it is decreasing there. By Lemma 6.3 , so there are no zeros on .
- •
If then by induction hypothesis. By (Appendix. Location of the zeros of the polynomials ) we have , so it is increasing there. As , there are no zeros on .
- •
If then (Appendix. Location of the zeros of the polynomials ) says that . So if there is a zero, is increasing. As the last zero before cannot be increasing, this last zero has to be .
- •
For , if it was a zero of , then it is also a zero of because of (Appendix. Location of the zeros of the polynomials ). Then we write , and develop (Appendix. Location of the zeros of the polynomials ) to see that for small. But this implies that there must be another zero of in with decreasing slope, which contradicts the previous item.
- •
If then (Appendix. Location of the zeros of the polynomials ) says that . So if there is a zero, is decreasing. There must be at least one zero, but there cannot be two zeros, since there cannot be two decreasing consecutive zeros.
∎
It is relevant to locate the complex zeros of . The polynomial has a pair of conjugate complex roots . The polynomial has one real root and a pair of conjugate complex roots . The polynomial has pairs of conjugate complex roots: , . We may expect that all roots of have .
To locate the complex roots of , we rewrite the differential equation (Appendix. Location of the zeros of the polynomials ) as
[TABLE]
Take , hence . We make the change of variables to get , and integrating
[TABLE]
where we have used that for , it is and hence . Note that is the truncation of the series , which is convergent on .
Proposition 6.5**.**
The polynomial has no roots in except .
Proof.
We will look at the polynomial
[TABLE]
for which we want to check that the only root in the disc is . For , we have
[TABLE]
Then if , we have
[TABLE]
which implies . Combined with , we have . ∎
Undoing the change of variables , we get that all roots of are in . Therefore, with (26) we get that the roots of are and the others lie in .
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] BAILEY, D.H.; A compendium of BBP-type formulas for mathematical constants , https://crd-legacy.lbl.gov/~dhbailey/dhbpapers/bbp-formulas.pdf , accessed August 2017.
- 2[2] BAILEY, D.H.; BORWEIN, P.B.; Experimental Mathematics: Recent Developments and Future Outlook , Mathematics Unlimited — 2001 and Beyond, Springer, p.51-66, 2001.
- 3[3] BAILEY, D.H.; BORWEIN, P.B.; Experimental Mathematics: Examples, methods and implications , Notices AMS, p.502-514, 2005.
- 4[4] BAILEY, D.H.; BORWEIN, J.M.; MATTINGLY, A.; WIGHTWICK, G.; The computation of previously inaccessible digits of π 2 superscript 𝜋 2 \pi^{2} and Catalan’s constant , Notices Amer. Math. Soc. 60 , 7, p. 844-855, 2013.
- 5[5] BAILEY, D.H.; BORWEIN, P.B.; PLOUFFE, S.; On the Rapid Computation of Various Polylogarithmic Constants , Mathematics of Computation, 66 , 218, p. 903-913, 1997.
- 6[6] BAILEY, D.H.; CRANDALL, R.E.; On the random character of fundamental constant expansions , Experimental Mathematics, 10 , 2, p. 175-190, 2001.
- 7[7] BAILEY, D.H.; CRANDALL, R.E.; Random generators and normal numbers , Experimental Mathematics, 11 , p. 527-546, 2002.
- 8[8] BAILEY, D.H.; MISIUREWICZ, M.; A strong hot spot theorem , Proc. Amer. Math. Soc. 134 , p. 2495-2501, 2006.
