aa r X i v : . [ m a t h . N T ] F e b SELF-REPLICATION AND BORWEIN-LIKE ALGORITHMS
JES ´US GUILLERA
To the memory of Jonathan Borwein
Abstract.
Using a self-replicating method, we generalize with a free parametersome Borwein algorithms for the number π . This generalization includes values ofthe Gamma function like Γ(1 / /
4) and of course Γ(1 /
2) = √ π . In addition,we give new rapid algorithms for the perimeter of an ellipse. Introduction
In the mid ’80s the Borwein brothers observed that the modular equations givenby Ramanujan could be connected to the number π via the elliptic alpha function,to construct extraordinarily rapid algorithms to calculate π [6, p. 170]. The point ofview of the Borweins is explained in [7], and their proofs require a good knowledge ofthe elliptic modular functions and forms. In [11] we presented a different and simplestrategy and we used it further in [9] applying it to new self-replicating identities ofnon-hypergeometric type. It is precisely in [9] where we named the technique as self-replication method , and its property as Hidden Modularity , which makes knowledgeof modularity (although interesting) unnecessary to prove the algorithms. In thispaper we generalize, with a free parameter, some Borwein algorithms for the number π , to include some values of the Gamma function, like Γ(1 / /
4) and of courseΓ(1 /
2) = √ π . In addition, we give new rapid algorithms for the perimeter of anellipse. 2. Algebraic transformations
In this section we use known algebraic transformations to obtain self-replicationidentities.2.1.
Landen’s transformation.
Landen (1719-1790) proved the following remark-able formula [1, p. 591]: ∞ X k =0 ( a ) k ( b ) k (2 b ) k (1) k (cid:18) t (1 + t ) (cid:19) k = (1 + t ) a ∞ X k =0 (cid:0) a ) k ( a − b + (cid:1) k (cid:0) b + (cid:1) k (1) k t k . Here, we only will need the particular case a = b = 1 / ∞ X k =0 (cid:0) (cid:1) k (1) k x k = (1 + t ) ∞ X k =0 (cid:0) (cid:1) k (1) k t k , t = 1 − √ − x √ − x . Observe that this transformation is quadratic because t ∼ − · x . In [10] we explainhow to re-prove known algebraic transformations in an elementary way. Then, if weapply the differential operator a + b ϑ x = a + b t − t ϑ t , to both sides of (1), we have (cid:18) a + b ϑ x (cid:19) ( ∞ X k =0 (cid:0) (cid:1) k (1) k x k ) = (cid:18) a + b t − t ϑ t (cid:19) ( (1 + t ) ∞ X k =0 (cid:0) (cid:1) k (1) k t k ) , and we arrive at the self-replicating identity:(2) ∞ X k =0 (cid:0) (cid:1) k (1) k ( a + bk ) x k = ∞ X k =0 (cid:0) (cid:1) k (1) k (cid:18) a (1 + t ) + b t (1 + t )1 − t + 2 b (1 + t ) − t k (cid:19) t k . Writing α = a (1 + t ) + b t (1 + t )1 − t , β = 2 b (1 + t ) − t , we see the self-replication with clarity. In Section 3 we will use the fact that theproduct of a power of the identity (1) by identity (2) also has a self-replicationproperty.2.2. Cubic transformation.
The following known algebraic transformation(3) ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k x k = (1 + 2 t ) ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k t k , t = 1 − √ − x √ − x , [8, Chapter 4], is of degree 3 (cubic). Applying to it the operator a + b ϑ x = a + b (1 + 2 t )(1 − t )(1 − t ) ϑ t , we arrive at the identity(4) ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k ( a + bk ) x k = ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k (cid:18) a (1 + 2 t ) + 2 b t (1 + 2 t )(1 − t )(1 − t ) + 3 b (1 − t )(1 + 2 t ) (1 − t ) k (cid:19) t k . Writing α = a (1 + 2 t ) + 2 b t (1 + 2 t )(1 − t )(1 − t ) , β = 3 b (1 − t )(1 + 2 t ) (1 − t ) , we see that it is a self-replicating identity. ELF-REPLICATION AND BORWEIN-LIKE ALGORITHMS 3
Quartic transformation.
Finally, consider the following known quartic alge-braic transformation [8, Chapter 4]:(5) ∞ X k =0 (cid:0) (cid:1) k (1) k x k = (1 + t ) ∞ X k =0 (cid:0) (cid:1) k (1) k t k , t = 1 − √ − x √ − x . Applying to both sides the operator a + b ϑ x = a + b (1 + t )(1 + t )(1 − t ) ϑ t , we have the identity(6) ∞ X k =0 (cid:0) (cid:1) k (1) k ( a + bk ) x k = ∞ X k =0 (cid:0) (cid:1) k (1) k (cid:18) a (1 + t ) + 2 b t (1 + t )(1 + t ) (1 − t ) + 4 b (1 + t )(1 + t ) (1 − t ) k (cid:19) t k . In this case writing α = a (1 + t ) + 2 b t (1 + t )(1 + t ) (1 − t ) , β = 4 b (1 + t )(1 + t ) (1 − t ) , we see that it is a self-replicating identity.3. A generalization of Borweins’ algorithms for π In this section we use self-replication formulas and couples of series of Ramanujan-type to derive a kind of rapid algorithms of Borwein-type. A couple of such seriesis the following known one: ∞ X k =0 ( s ) k (1 − s ) k (1) k k = √ π Γ (cid:0) − s (cid:1) Γ (cid:0) + s (cid:1) , ∞ X k =0 ( s ) k (1 − s ) k (1) k k k = s √ π Γ (cid:0) s (cid:1) Γ (cid:0) − s (cid:1) , which can be proved automatically by the Wilf-Zeilberger (WZ)-method due tothe presence of the free parameter s . We will use this couple of identities to getinitial values for our algorithms, but observe that this is only possible for s =1 / , / , / , /
6, because we need to use algebraic transformations, to derive therecurrences of the algorithms, and they do not exist for other values of s . In [11,Sect. 4] we see other couples of series which can be used to get the initial valuesand the result to which the quadratic and quartic algorithms tend. To deduce thealgorithms we will use the method explained in [11]. JES ´US GUILLERA
A quadratic algorithm.
Taking s = 1 /
2, we get ∞ X k =0 (cid:0) (cid:1) k (1) k k = √ π Γ (cid:0) (cid:1) , ∞ X k =0 (cid:0) (cid:1) k (1) k k k = Γ (cid:0) (cid:1) π / . Hence, we have the following formula:(7) ∞ X k =0 (cid:0) (cid:1) k (1) k k ! w ∞ X k =0 (cid:0) (cid:1) k (1) k k k = 1Γ (cid:0) (cid:1) w − π − w . From (1) and (2), letting A n = ∞ X k =0 (cid:0) (cid:1) k (1) k d kn ! w ∞ X k =0 (cid:0) (cid:1) k (1) k ( a n + b n k ) d kn , observing that lim a n = lim A n = A (see [11] for the explanation), getting the initialvalues and the limit from (7), and defining c n = b n / (1 − d n ), we arrive at d = 1 √ , c = 2 , a = 0 ,d n +1 = 1 − p − d n p − d n , c n +1 = 2 c n (1 + d n +1 ) w − ,a n +1 = a n (1 + d n +1 ) w +1 + 12 c n +1 d n +1 (1 − d n +1 ) ,a n ( w ) → (cid:0) (cid:1) w − π − w , which is a quadratic algorithm. Some examples are a n (1) → π , a n (3) → (cid:0) (cid:1) , a n ( 13 ) → √ (cid:0) (cid:1) ! , which are algebraic algorithms for π , Γ(3 /
4) and Γ(1 /
4) respectively. We see thatthe case w = 1 with the substitution a n = r n − n d n , is a Borweins’ quadraticalgorithm for π . A related algorithm for Γ(1 /
4) is given in [5, p. 137]. In [10]we deduced the Borweins’ quadratic algorithm for π from the Gauss-Salamin-Brentalgorithm, and it is easy to prove that in fact both algorithms are equivalent.3.2. A cubic algorithm.
In a similar way, from the (3) and (4), defining A n = ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k d kn ! w ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k ( a n + b n k ) d kn , observing that lim a n = lim A n = A , letting c n = b n / (1 − d n ), and taking the initialvalues from(8) ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k k ! w ∞ X k =0 (cid:0) (cid:1) k (cid:0) (cid:1) k (1) k k k = 3 − w · w − π − w · Γ (cid:0) (cid:1) w − , ELF-REPLICATION AND BORWEIN-LIKE ALGORITHMS 5 we arrive at the following algorithm d = 1 √ , c = 2 , a = 0 ,d n +1 = 1 − p − d n p − d n , c n +1 = 3 c n (1 + 2 d n +1 ) w − ,a n +1 = a n (1 + 2 d n +1 ) w +1 + 23 c n +1 d n +1 − d n +1 d n +1 ,a n ( w ) → − w · w − π − w · Γ (cid:0) (cid:1) w − , which generalizes a cubic algorithm for π due to the Borwein brothers. Some exam-ples are a n (1) → √ π , a n (2) → √ · Γ (cid:0) (cid:1) , a n ( 12 ) → √ (cid:0) (cid:1) ! , which are algebraic algorithms for π , Γ(2 /
3) and Γ(1 /
3) respectively.3.3.
A quartic algorithm.
From (5) and (6), defining A n = ∞ X k =0 (cid:0) (cid:1) k (1) k d kn ! w ∞ X k =0 (cid:0) (cid:1) k (1) k ( a n + b n k ) d kn , letting c n = b n / (1 − d n ) and getting the initial values from (7), we see that taking d = 1 √ , c = 2 , a = 0 , and the recurrences d n +1 = 1 − p − d n p − d n , c n +1 = 4 c n (1 + d n +1 ) w − , (9) a n +1 = a n (1 + d n +1 ) w +2 + 12 c n +1 d n +1 d n +1 (1 − d n +1 ) , (10)we have a n ( w ) → (cid:0) (cid:1) w − π − w . Some examples are a n (1) → π , a n (3) → (cid:0) (cid:1) , a n ( 13 ) → √ (cid:0) (cid:1) ! . In [2, Chapter 31] there are many algorithms for π , Γ(1 / /
8) and other con-stants related to the evaluation of the elliptic integral K at the singular values. JES ´US GUILLERA The perimeter of an ellipse
The perimeter P ( a, b ) of an ellipse of semi-axis a and b with a ≥ b , is given bythe elliptic integral P ( a, b ) = 4 a Z π p − x cos ϕ dϕ, x = r − b a , where x is the eccentricity of the ellipse. The development in series of powers of x leads to the following hypergeometric formula [12, p. 38-39]:(11) P ( a, b ) = 2 πb a ∞ X k =0 (cid:0) (cid:1) k (1) k (1 + 2 k ) (cid:18) − b a (cid:19) k , which is known to be related to the AGM (Arithmetic Geometric Mean) of Gauss.For details and an historical account see [1]. The authors of that paper commentthat an Ivory’s letter of 1796 unmistakenly pointed that he knew it. The followingalgorithms come from our method of self-replication instead of using the AGM.4.1. A quadratic algorithm for the perimeter.
From the hypergeometric for-mula (11) for P ( a, b ) and the self-replicating transformation (2), we can arrive atthe following quadratic algorithm: d = r − b a , a = 1 , c = 2 a b ,d n +1 = 1 − p − d n p − d n , c n +1 = 2 c n d n +1 ,a n +1 = a n (1 + d n +1 ) + 12 c n +1 d n +1 (1 − d n +1 ) , πb a a n → P ( a, b )In [1, eq. 27] there is a related quadratic algorithm for P ( a, b ) based on the AGM.4.2. A quartic algorithm for the perimeter.
From the quartic recurrences (9)with w = 0: d n +1 = 1 − p − d n p − d n , c n +1 = 4 c n (1 + d n +1 ) ,a n +1 = a n (1 + d n +1 ) + 12 c n +1 d n +1 d n +1 (1 − d n +1 ) , and taking as initial values d = r − b a , c = b − d = 2 a b , a = 1 , we see that 2 πb a a n → P ( a, b ) , quartically, that is multiplying by 4 the number of correct digits in each iteration. ELF-REPLICATION AND BORWEIN-LIKE ALGORITHMS 7
Remark 4.1.
The papers [1] and [7] are reprinted in [3], and the paper [12] isreprinted in [4]. The books [4] and [3] are two collections of very interesting papersrelated to the number π . The book [2] will be useful for the computationalist,whether a working programmer or anyone interested in methods of computation.The recent nice book [8] by Shaun Cooper deals with Ramanujan’s theta functions,and in the Chapter 14 there are applications to series and algorithms for 1 /π . References [1]
G. Almkvist and B. Berndt , Gauss, Landen, Ramanujan, the Arithmetic-Geometric mean,Ellipses, π , and the Ladies Diary . Amer. Math. Monthly (1988), 585-608.[2] J. Arndt , Matters computational (Ideas, Algorithms, Source Code).
Springer-Verlag
BerlinHeidelberg 2011.[3]
D. Bailey and J. Borwein , Pi: The Next Generation.
Springer International Publishing ,Switzerland 2016.[4]
L. Berggren, J.Borwein and P. Borwein , Pi: A Source Book.
Springer-Verlag , NewYork, 1997, 2000.[5]
J. Borwein and D. Bailey , Mathematics by Experiment (Plausible Reasoning in the 21stCentury).
A. K. Peters, Ltd.
Wellesley, MA 2008.[6]
J. Borwein and P. J. Borwein , Pi and the AGM: A Study in Analytic Number Theoryand Computational Complexity. Canad. Math. Soc. Series Monographs Advanced Texts,
JohnWiley , New York, 1987.[7]
J. Borwein and P. Borwein , Ramanujan, Modular Equations, and Approximations to Pior How to Compute One Billion Digits of Pi.
Amer. Math. Monthly (1989), 201-219.[8] S. Cooper , Ramanujan’s Theta Functions. Springer, to appear.[9]
S. Cooper, J. Guillera, A. Straub and W. Zudilin , Crouching AGM, Hidden Modu-larity. (Submitted).[10]
J. Guillera , Easy Proofs of Some Borwein Algorithms for π . Amer. Math. Monthly (2008), 850-854.[11]
J. Guillera , New proofs of Borwein-type algorithms for Pi. Integral Transforms and Specialfunctions.
Published on line : June 29, 2016.[12]
S. Ramanujan , Modular equations and approximations to π . Quarterly Journal of Mathe-matics (1914), 350-372. Department of Mathematics, University of Zaragoza, 50009 Zaragoza, SPAIN
E-mail address ::