A method to reduce the Lehmer measure in a multi-term Machin-like formula for $\pi$

Previously we have proposed a new method of transforming quotients into integer reciprocals in the Machin-like formulas for $\pi$. As a further development, here we show how to generate a multi-term Machin-like formula for $\pi$ with a reduced Lehmer measure. The Mathematica codes validating these results are presented.


Introduction
The Machin-like formulas for π can be represented in the following form [1][2][3][4][5] In many known equations the values B j are integers. Among many other formulas for π [3][4][5][6][7], the identities of kind (1) involving arctangent function represent a particular interest due to their potential for rapid convergence.
Since the Maclaurin series expansion of the arctangent function is given by we can conclude that in order to improve convergence rate the numbers B j in equation (1) should be as large as possible by absolute values. Furthermore, the computational efficiency of a given Machin-like formula (1) for π is obviously higher if the number of the terms J is smaller. It should be noted that implementation of the binary splitting algorithm can also be used to accelerate computation of the series (2) (see for example [8]). Lehmer introduced a measure [1,2,9,10] µ = J j=1 1 log 10 (|B j |) .
Nowadays, the equation (3) is known as the Lehmer measure. We take absolute values |B j | since the constants B j in equation (1) may generally be negative. According to Lehmer, the measure (3) shows "amount of labor" that is required for computation of π for some given Machin-like formula. Specifically, the lower Lehmer measure µ indicates the higher computational efficiency of the Machin-like formula (1) for π. For example, the original Machin formula for π [1][2][3][4][5][11][12][13] π 4 = 4 arctan 1 5 − arctan 1 239 (4) that was found by English mathematician John Machin in 1706 has the Lehmer measure µ ≈ 1.85113. However, the following Machin-like formula for π π 4 = 12 arctan 1 18 + 8 arctan 1 57 − 5 arctan 1 239 (5) that was discovered by Gauss has the Lehmer measure µ ≈ 1.78661 [1,2]. This signifies that the formula (5) is more efficient in computation of π than the formula (4) as its Lehmer measure is smaller. More detailed descriptions and significance of the Lehmer measure (3) in computation of π can be found in literature [10].
Previously we have shown that the following identity [14] (see also [15]) where a k = √ 2 + a k−1 , a 0 = 0, can be rearranged as where the constant α can be taken as for any integer k greater than 1.
Once α is known, the constant β in equation (6) can be found by using the following equation [14,15] β = 2 Application of equation (8) is not optimal since increasing k drastically slows down computation of the constant β. Fortunately, as we have shown in our work [16] the constant β in equation (6) can be found more efficiently by using a two-step iteration with initial values defined as and A method, known as the Todd's process, is commonly used to generate the Machin-like formulas for π [10] (see also [17]). However, this method is not simple and requires tedious and complicated manipulations with large-size matrices based on a set of some prime numbers [10]. Furthermore, it seems that computer-aided algorithms based on Todd's process still cannot generate the Machin-like formulas for π containing only integer reciprocals with µ below 1. For example, the following Machin-like formula for π containing only integer reciprocals (see [ has the Lehmer measure µ ≈ 1.34085. To the best of our knowledge this is the smallest Lehmer measure ever reported for the Machin-like formulas for π containing only integer reciprocals. In our previous publication we have proposed a new method that transforms quotients into integer reciprocals in the Machin-like formulas for π [19]. In particular, we have shown how this approach can be used to generate a Machin-like formula for π that can retain without any quotients the Lehmer measure µ below one. As a further development of our work [19], here we show how to generate the Machin-like formula for π with the Lehmer measure µ less than 1 even at a smaller values of the integer k. As an example we show that for k = 4 the corresponding Machin-like formula (22) for π has the Lehmer measure 0.956916. Therefore, this approach may be promising for efficient computation of digits of π.

Preliminaries
As an example, we can take k = 4. Substituting this value into equation (7) we have Then, using equations (10a), (10b) and (10c) together with two-step iteration (9), we can find that Consequently, substituting these values α and β into equation (6) yields We use can Mathematica to verify this two-term Machin-like formula for π in two ways. The first way is to use a built-in algorithm of the Mathematica by equating logically (with == symbols) the left and right sides of equation (12). The following Mathematica code: Another way of validation that follows from equation (1), implies that the real and imaginary parts of the product (detailed description can be found in [11]) must be equal to each other. For example, there is an elementary proof for the original Machin formula (4) for π [20] (5 + i) 4 (259 + i) −1 = 2(1 + i).
Therefore, the following Mathematica code: also validates the equation (12) by returning True since the real and imaginary parts of the product are equal to each other. Further, we will use the second way of validation since it is explicit and, therefore, intuitive for understanding. The Machin-like formula (12) for π contains a quotient in the argument of the second arctangent function. This quotient is undesirable as its large numerator 1758719 increases the argument of the arctangent function that slows down the convergence rate. Moreover, it also contributes for more digits that also slows down the computation when expansion series like (2) for the arctangent function is used. Therefore, it is very desirable to look for the Machin-like formulas for π, where all constants B j are integers. In order to resolve this problem we proposed a new method based on the following identity (see [19] for derivation) Application of the identity (13) has appeared to be very efficient. Consider as an example a remarkable Machin-like formula for π that was found by Wetherfield The Lehmer measure of this formula is small µ ≈ 1.26579 (see definition (3) for computation of µ). However, the arguments in the last two arctangent function arguments are not integer reciprocals and, consequently, practical application of equation (14) may be questionable. In order to eliminate these two quotients in arctangent function arguments we can use the following identity Substituting these two arctangent function relations into equation (14) results in equation (11). Consider now how our approach based on identity (13) can be used to eliminate quotients in (14) [19]. Specifically, applying equation (13) where all arguments are integer reciprocals. The Lehmer's measure for this equation is µ ≈ 1.39524. It seems that equation (15) is new and first appeared in our recent publication [19]. The Mathematica code below: validates equation (15)  The current record that was achieved by using the Chudnovsky brothers formula [22] is 62.8 trillion digits of π [23]. This record is larger than Kanada's 20 years old record by a factor ∼ 60. Since this factor is not large, despite relatively high Lehmer's measures 1.58604 and 1.7799 we may expect that using most modern supercomputer the self-checking pair above can also generate a comparable amount of digits of π. Therefore, the Machin-like formulas with small Lehmer's measure have a colossal potential and remain competitive in computing digits of π.
Since Lehmer's measures of equations (11) and (15) are smaller, their application in computing π is potentially more efficient than the self-checking pair that was used by Kanada. Furthermore, since first three arctangent function terms in both equations are same, it is easier to compare results of computation when equations (11) and (15) are used as a self-checking pair.
We have shown already that identity (13) can be used in an iterative procedure such that from equation (12) it follows that (see [19] for derivation) As we can see, this formula contains only integer reciprocals. Therefore, the iteration procedure based on equation (13) can be used as an alternative to the Todd's process. The 7-term Machin-like formula (16) for π can be validated by running the following Mathematica code: The output of this code is True.
Thus, the initial equation (12) with quotient can be transformed into equation (16) with help of the identity (13) using an iterative procedure described in our publication [19]. We can also notice that starting from the second arctangent function term each consecutive integer in equation (16) is larger by absolute value than the previous one by many orders of the magnitude. This signifies that each consecutive arctangent term contributes smaller and smaller amount for the Lehmer measure µ. Consequently, due to rapidly increasing integers this iteration process enable us to generate the Machin-like formula for π with a small Lehmer measure.

Derivation
We will attempt to transform the Machin-like formula (12) for π in a form where initial arctangent terms contain arguments of kind 1/10 m , where m is a positive integer. Solving the equation we can rewrite equation (12)  Applying now the following identity (see also [19]) arctan (x + y) = arctan (x) + arctan y 1 + (x + y) x the equation (12) can be recast as .
Repeating same procedure again for equation (17) 28718779 The following Mathematica code: The Mathematica code below validates equations (20) and (21) where integer in the last term consists of 600, 593 digits.
It is not difficult to show that equation (22) can be represented in a more compact form as =8 arctan 1 10 − arctan 1 100 − 2 arctan 1 1000 We ceased iteration at 18 th step since the number is not a quotient but an integer (see [19] showing how iteration is implemented).
The following Mathematica code: returns True for validation of the equation (22). As we have reported in [24], the arctangent function can be expanded as a series Using this series expansion we can obtain the following relation arctan 1 10 =10 arctan 1 100 where the quotient on the right side can be eliminated by using equation (13) in iterative procedure. Therefore, there is a possibility to rearrange the equation (12) with starting term 80 arctan(1/100). This may be more advantageous in computation due to faster convergence.
However, the measure may be reduced under some specific criteria. In particular, Lehmer justifiably noticed that the actangent terms of kind arctan 1 10 m , m ∈ N.
are much easier to calculate (see [1], page 662). Therefore, he suggested to assign the measure 1/2 for the arctangent term arctan (1/10). Moreover, Lehmer also pointed out that if a Machin-like formula for π besides arctan (1/10) includes the arctangents of other powers of 1/10, then the measure 0 should be assigned to all of them since the Maclaurin series expansion (2) of arctan (1/10) already contains all required digits in mantissa of each term that can be used further for computation of arctan (1/10 m ). More explicitly, once in accordance with equation (2)  The generated output is: The Lehmer measure of identity (22) is: 0.956916 As we can see from this example, the Lehmer measure below one can be achieved in a Machin-like formula for π without any quotient and at a smaller values of the integer k. Despite that the initial formula (12) for π that we used as a starting point in iterative procedure, corresponds to the small integer k = 4, this method enables us to generate the multi-term Machin-like formula (22) for π with Lehmer measure less than unity, µ ≈ 0.956915.
Consider for comparison the following two Machin-like formulas for π that also include three arctangent terms with arguments 1/10, 1/100 and 1/1000 [25] (22) for π is computationally more efficient since its Lehmer's measure is significantly smaller. The computation of the first three arctangent terms in equation (22) can be implemented by using the Maclaurin series expansion (2) since in decimal system no actual multiplications in determination of powers of 1/10 are needed (as mentioned, this can be done only by decreasing exponent and keeping mantissa unchanged in each term). However, starting from the forth arctangent term arctan (1/20573) application of the Maclaurin series expansion (2) may not be optimal since faster convergence rate can be achieved by using either Euler's formula [26,27] arctan or iteration-based formula [24] arctan (x) = 2 where Chien-Lih showed an elegant derivation of the Euler's formula (25) by an elementary method [27]. In particular, this series expansion can be derived by taking integral in terms of geometric series Iteration-based equation (26) represents a trivial rearrangement of the series expansion that we derived in our work [28].
It should be noted that apart from decimal system, other number systems can also be used in the Machin-like formulas for π. For example, a more rapid computation of the Maclaurin series expansion (2) can also be achieved for the arctangent terms like arctan (1/8 m ) and arctan (1/16 m ) in octal and hexadecimal systems, respectively.

Klingenstierna's identity
The method described above can also be used to derive some known Machinlike formulas for π. This derivation is much easier than the conventional derivations. For example, solving and representing the last arctangent term from equation (17)  is relatively small, this Machin-like formula may not be optimal for computing π due to quotient in its last arctangent term.

Alternative representation
It is interesting to note that a slight modification of the identity (13) as given by can also be used to generate the Machin-like formulas for π. Return to equation (12) again and assume that For, say, n = 2 substituting this value z into identity (27) Iteration is completed at 9 th step since (see [19] for a detailed description of iteration procedure)

Conclusion
A method that can be used to generate a multi-term Machin-like formula for π with a reduced Lehmer measure is presented. We show that the Lehmer measure below 1 can be achieved even at small value of the integer k = 4. Specifically, as an example we derive the Machin-like formula (22) for π with the Lehmer measure µ ≈ 0.956916. This value is significantly smaller than the smallest Lehmer measure 1.34085 known so far among the Machin-like formulas for π consisting of only integer reciprocals.