Pi Formulas -- from Wolfram MathWorld
Pi Formulas
There are many formulas of

of many types. Among others, these include
series, products, geometric constructions, limits, special values, and
pi
iterations.

is intimately related to the properties of circles
and spheres. For a circle of
radius 
, the circumference
and area are given by
Similarly, for a sphere of
radius 
, the surface area
and volume enclosed are
An exact formula for

in terms of the
inverse
tangents of
unit fractions is
Machin's
formula
 | (5)
|
There are three other
Machin-like formulas,
as well as thousands of other similar formulas having more terms.
Gregory and Leibniz found
(Wells 1986, p. 50), which is known as the
Gregory series and may be obtained by plugging

into the
Leibniz series for

. The error
after the

th term of this series in the
Gregory
series is larger than

so this sum converges so slowly
that 300 terms are not sufficient to calculate

correctly to two
decimal places! However, it can be transformed to
 | (8)
|
where

is the
Riemann
zeta function (Vardi 1991, pp. 157-158; Flajolet and Vardi 1996), so that
the error after

terms is

.
An infinite sum series to Abraham Sharp (ca. 1717) is given by
 | (9)
|
(Smith 1953, p. 311). Additional simple series in which

appears are
(Wells 1986, p. 53).
In 1666, Newton used a geometric construction to derive the formula
which he used to compute

(Wells 1986, p. 50; Borwein
et
al. 1989; Borwein and Bailey 2003, pp. 105-106). The coefficients can be
found from the integral
by taking the series expansion of

about
0, obtaining
 | (22)
|
(OEIS
A054387 and
A054388). Using Euler's
convergence improvement
transformation gives
(Beeler
et al. 1972, Item 120).
This corresponds to plugging

into
the
power series for the
hypergeometric
function 
,
 | (26)
|
Despite the convergence improvement, series (◇) converges at only one bit/term. At the cost of a
square root, Gosper has noted that

gives 2 bits/term,
 | (27)
|
and

gives almost 3.39 bits/term,
 | (28)
|
where

is the
golden
ratio. Gosper also obtained
 | (29)
|
A
spigot algorithm for

is given by Rabinowitz
and Wagon (1995; Borwein and Bailey 2003, pp. 141-142).
More amazingly still, a closed form expression giving a
digit-extraction algorithm which produces digits of

(or

) in base-16
was discovered by Bailey
et al. (Bailey
et al. 1997, Adamchik and Wagon
1997),
 | (30)
|
This formula, known as the
BBP formula, was discovered using the
PSLQ algorithm (Ferguson
et al. 1999)
and is equivalent to
 | (31)
|
There is a series of
BBP-type formulas for

in powers of

, the first
few independent formulas of which are
Similarly, there are a series of
BBP-type formulas for

in powers of

, the first few
independent formulas of which are
F. Bellard found the rapidly converging
BBP-type
formula
 | (49)
|
A related integral is
 | (50)
|
(Dalzell 1944, 1971; Le Lionnais 1983, p. 22; Borwein, Bailey, and
Girgensohn 2004, p. 3; Boros and Moll 2004, p. 125; Lucas 2005; Borwein
et al.
2007, p. 14). This integral was known by K. Mahler in the mid-1960s
and appears in an exam at the University of Sydney in November 1960 (Borwein, Bailey,
and Girgensohn, p. 3). Beukers (2000) and Boros and Moll (2004, p. 126)
state that it is not clear if these exists a natural choice of rational polynomial
whose integral between 0 and 1 produces

, where
333/106 is the next convergent. However, an integral exists for the
fourth
convergent, namely
 | (51)
|
(Lucas 2005; Bailey
et al. 2007, p. 219). In fact, Lucas (2005) gives
a few other such integrals.
Backhouse (1995) used the identity
for positive integer

and

and where

,

, and

are rational constant
to generate a number of formulas for

. In particular,
if

, then

(Lucas 2005).
A similar formula was subsequently discovered by Ferguson, leading to a
two-dimensional lattice of such formulas which can be generated by these
two formulas given by
 | (55)
|
for any complex value of

(Adamchik and Wagon), giving the
BBP
formula as the special case

.
An even more general identity due to Wagon is given by
![pi+4tan^(-1)z+2ln((1-2z-z^2)/(z^2+1))=sum_(k=0)^infty1/(16^k)[(4(z+1)^(8k+1))/(8k+1)-(2(z+1)^(8k+4))/(8k+4)-((z+1)^(8k+5))/(8k+5)-((z+1)^(8k+6))/(8k+6)]](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4ExmwaD-DKTq2w9lPyUybGfUQHACzT9-vOTAC9PC3Fy9X_XzvFvl-RcddnPIglPiRInyoAsOC0yzEgdn5QlqBzvuJ7JGrZuRyWkOTz4yO0c-X8dxLIBGIwQ5kMSZfUBEy3BebRHzr8cQX7Imbkx-9sjv3jM=s0-d) | (56)
|
(Borwein and Bailey 2003, p. 141), which holds over a region of the
complex plane excluding two triangular portions symmetrically placed about the
real
axis, as illustrated above.
A perhaps even stranger general class of identities is given by
![pi=4sum_(j=1)^n((-1)^(j+1))/(2j-1)+((-1)^n(2n-1)!)/4sum_(k=0)^infty1/(16^k)[8/((8k+1)_(2n))-4/((8k+3)_(2n))-4/((8k+4)_(2n))-2/((8k+5)_(2n))+1/((8k+7)_(2n))+1/((8k+8)_(2n))]](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4EyUsg16vLfVrZ-sTc3YS0rXZ2alZqN0eFOh62qcEoTzNyaneezkLzH9Qb_7eiLETvfYwtfOV3uUY8vcDIIln9J34wj0Cdcf4TrisJKEfG-LAPbPyb2d0KJf1FCJk85iZHY5ObqB7GB2lnxm1wSzPPj-kuQ=s0-d) | (57)
|
which holds for any positive integer

, where

is a
Pochhammer
symbol (B. Cloitre, pers. comm., Jan. 23, 2005). Even more amazingly,
there is a closely analogous formula for the
natural
logarithm of 2.
Following the discovery of the base-16 digit
BBP formula and related formulas, similar formulas in other bases were investigated. Borwein,
Bailey, and Girgensohn (2004) have recently shown that

has no Machin-type
BBP arctangent formula that is not binary, although this does not rule out a completely
different scheme for
digit-extraction algorithms
in other bases.
S. Plouffe has devised an algorithm to compute the

th
digit
of

in any base in

steps.
A slew of additional identities due to Ramanujan, Catalan, and Newton
are given by Castellanos (1988ab, pp. 86-88), including several
involving sums of
Fibonacci
numbers. Ramanujan found
![sum_(k=0)^infty((-1)^k(4k+1)[(2k-1)!!]^3)/([(2k)!!]^3)=sum_(k=0)^infty((-1)^k(4k+1)[Gamma(k+1/2)]^3)/(pi^(3/2)[Gamma(k+1)]^3)=2/pi](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4Ew9g1JNGf42M-U_ZrJQLdDFcdrJ88D-0aMvaPwfD0fGvYWDzgDY9_1Ze7feeL_0J0VhgCDesVE4jYPrCsKTXDC2Rv_PsO_lO6ZdlUsP5bzQbqtAbphb0oAIXWsDm3zOwfU0_IIoXKWK_5tyFHDqiQZl5g=s0-d) | (58)
|
(Hardy 1923, 1924, 1999, p. 7).
Plouffe (2006) found the beautiful formula
 | (59)
|
An interesting
infinite product formula due to Euler which relates

and the

th
prime 
is
(Blatner 1997, p. 119), plotted above as a function of the number of terms in the product.
A method similar to Archimedes' can be used to estimate

by starting with
an

-gon and then relating the
area
of subsequent

-gons. Let

be the
angle
from the center of one of the
polygon's segments,
 | (62)
|
then
 | (63)
|
(Beckmann 1989, pp. 92-94).
Vieta (1593) was the first to give an exact expression for

by taking

in the above expression, giving
 | (64)
|
which leads to an
infinite product of
nested
radicals,
 | (65)
|
(Wells 1986, p. 50; Beckmann 1989, p. 95). However, this expression was not rigorously proved to converge until Rudio in 1892.
A related formula is given by
 | (66)
|
which can be written
 | (67)
|
where

is defined using the iteration
![pi_n=sqrt((1/2pi_(n-1))^2+[1-sqrt(1-(1/2pi_(n-1))^2)]^2)](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4Exuv9Vv5a0sFmfsVHN7reHAjGAiP-3bSxzHuyc_RGO73dvIPBs4A2wB9Sa0bt2BqlrKZjQKE-skDnFMZWunwPENOOZMXL7rjgLrHmD-mzPPr0DuGe9Kn9i7zelOEetK2b9iIiLTLJavgdnH1LRXw1mvSTQ=s0-d) | (68)
|
with

(J. Munkhammar, pers.
comm., April 27, 2000). The formula
![pi=2lim_(m->infty)sum_(n=1)^msqrt([sqrt(1-((n-1)/m)^2)-sqrt(1-(n/m)^2)]^2+1/(m^2))](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4EyTJJSIDf_1xtOJKRQ_ltGsGu3AZwOHdYQGUzZ7FSiZljaAZIt9ZojkA82kaciS1WgQhrQx693pzCg3c3ZnKAdygfEO8jcvA_Dt6VOmo8MUkE5sp8sDWDNDS03RXcyS71jAbCHBhyRAfJeudwZCoGiYsqI=s0-d) | (69)
|
is also closely related.
A pretty formula for

is given by
 | (70)
|
where the numerator is a form of the
Wallis formula for

and the denominator is a
telescoping
sum with sum 1/2 since
 | (71)
|
(Sondow 1997).
A particular case of the
Wallis formula gives
![pi/2=product_(n=1)^infty[((2n)^2)/((2n-1)(2n+1))]=(2·2)/(1·3)(4·4)/(3·5)(6·6)/(5·7)...](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4Exj8_BkpN2hZV-yL5I5M7qoUzVfvORXQ8K-VIXd2CPLttNgAkzZkBqfVHZBCB5dn-L0Ub7EAspDrfrf6fxZFYjmL8PjwXezvRYWOnER9b22q2cl4TvlQ8xfl6tnONnN4rNVyfDDfyoD-muwQFLb5doLl9I=s0-d) | (72)
|
(Wells 1986, p. 50). This formula can also be written
![lim_(n->infty)(2^(4n))/(n(2n; n)^2)=pilim_(n->infty)(n[Gamma(n)]^2)/([Gamma(1/2+n)]^2)=pi,](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4EyW72uVlIZKP0zRP8hlcT7BGW7G7KLGPdjIdu4O9KelfPIZoxwysHP7TWbpkqkojK6Ov79EnPGjGeCmDhsa1qJuQIX0_BS19IIyQ1gafq1hvqyE-v7xIUDwRcr_Azj7tCOjvSlBB3mtU00dyGvq5POYgNA=s0-d) | (73)
|
where

denotes a
binomial
coefficient and

is the
gamma
function (Knopp 1990). Euler obtained
 | (74)
|
which follows from the special value of the
Riemann zeta function 
. Similar
formulas
follow from

for all
positive
integers 
.
An infinite sum due to Ramanujan is
 | (75)
|
(Borwein
et al. 1989; Borwein and Bailey 2003, p. 109; Bailey
et al.
2007, p. 44). Further sums are given in Ramanujan (1913-14),
 | (76)
|
and
(Beeler
et al. 1972, Item 139; Borwein
et al. 1989; Borwein and Bailey 2003, p. 108; Bailey
et al. 2007, p. 44). Equation (
78)
is derived from a modular identity of order 58, although a first derivation was not
presented prior to Borwein and Borwein (1987). The above series both give
 | (79)
|
(Wells 1986, p. 54) as the first approximation and provide,
respectively, about 6 and 8 decimal places per term. Such series exist
because of the rationality of various modular invariants.
The general form of the series is
!)/((3n)!(n!)^3)1/([j(t)]^n)=(sqrt(-j(t)))/pi,](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4Ex3nWP2AHJpgZ_mvX6uzAgnK0zrBzOO0j-3LfhXFtMTSMXL8ormZOJ8w4QljFh5EeZKXvD0VFOqb45NsiXg9Rr4KUw0BRA_aiocg-rjnPtMOtPCeTDlMvEKCb73SAida7Z1IpmvdybI_i7_FmifLc8VZeg=s0-d) | (80)
|
where

is a
binary
quadratic form discriminant,

is the
j-function,
and the

are
Eisenstein
series. A
class number 
field involves

th degree
algebraic
integers of the constants

,

, and

. Of all series consisting of only integer
terms, the one gives the most numeric digits in the shortest period of time corresponds
to the largest
class number 1 discriminant of

and was formulated by the Chudnovsky brothers
(1987). The 163 appearing here is the same one appearing in the fact that

(the
Ramanujan constant) is very nearly an
integer. Similarly, the factor

comes from
the
j-function identity for

.
The series is given by
(Borwein and Borwein 1993; Beck and Trott; Bailey
et al. 2007, p. 44). This series gives 14 digits accurately per term. The same equation in another form
was given by the Chudnovsky brothers (1987) and is used by the
Wolfram
Language to calculate

(Vardi 1991; Wolfram Research),
![pi=(426880sqrt(10005))/(A[_3F_2(1/6,1/2,5/6;1,1;B)-C_3F_2(7/6,3/2,(11)/6;2,2;B)]),](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4EyuA0I7WSBbNyf4XQiMgR_Lazdcan17sYhEGKNqzm9oI4F338xarvXfV6wjVofYFgLQh8SP_yU2Be4SkxUK0xUeJF9LW3ffjzhqLF13a0IPxcIJecO-5uhypYjeTTJFnzegxs61Okq8FQA1ybu9HZJX99w=s0-d) | (85)
|
where
The best formula for
class number 2 (largest discriminant

) is
 | (89)
|
where
(Borwein and Borwein 1993). This series adds about 25 digits for each additional term. The fastest converging series for
class number
3 corresponds to

and gives 37-38 digits per term.
The fastest converging
class number 4 series corresponds
to

and is
 | (93)
|
where
This gives 50 digits per term. Borwein and Borwein (1993) have developed a general
algorithm for generating such series for arbitrary
class number.
A complete listing of Ramanujan's series for

found in his
second and third notebooks is given by Berndt (1994, pp. 352-354),
These equations were first proved by Borwein and Borwein (1987a,
pp. 177-187). Borwein and Borwein (1987b, 1988, 1993) proved other
equations of this type, and
Chudnovsky and Chudnovsky (1987) found similar equations for other
transcendental
constants (Bailey
et al. 2007, pp. 44-45).
A complete list of independent known equations of this type is given by
for

with nonalternating signs,
for

with alternating signs,
for

(Guillera 2002, 2003, 2006),
 | (125)
|
for

(Guillera 2002, 2003, 2006), and no others for

are known (Bailey
et al. 2007, pp. 45-48).
Bellard gives the exotic formula
![pi=1/(740025)[sum_(n=1)^infty(3P(n))/((7n; 2n)2^(n-1))-20379280],](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4ExpiUkMqMI_u7A9EhcKpoHRmaiZLazxDkIYC3Nkq3ZD5iph39Cp2RMTwW3gWPMli31Qka5g8lB-yS5k1WeCxC_czjbSrWsy5Zuz_3JfAOdiPTiID98FT57hx9SzldUi-hDYk3blsrctxylL6uGgexT3Brg=s0-d) | (126)
|
where
 | (127)
|
Gasper quotes the result
![pi=(16)/3[lim_(x->infty)x_1F_2(1/2;2,3;-x^2)]^(-1),](https://lh3.googleusercontent.com/blogger_img_proxy/ABLy4ExZVxNML47PztQuhb6khoItGRBdB2ovq7WzIiOzr2KRqb_8EBSo8ES67YOIN9zR2Ev6GK6mO7NjbQglxUcvWMAMQ748HEJR5mKEQGjCC1RpyVE3xlbbwhbtQqmgYQ-gt1oqEtiMcEzJhBOTkk40Je4puw=s0-d) | (128)
|
where

is a
generalized
hypergeometric function, and transforms it to
 | (129)
|
A fascinating result due to Gosper is given by
 | (130)
|

satisfies the
inequality
 | (131)
|
D. Terr (pers. comm.) noted the curious identity
 | (132)
|
involving the first 9 digits of pi.
SEE ALSO:
BBP Formula,
Digit-Extraction Algorithm,
Pi,
Pi Approximations,
Pi Continued Fraction,
Pi
Digits,
Pi Iterations,
Pi
Squared,
Spigot Algorithm
REFERENCES:
Adamchik, V. and Wagon, S. "A Simple Formula for

."
Amer.
Math. Monthly 104, 852-855, 1997.
Backhouse, N. "Note 79.36. Pancake Functions and Approximations to

."
Math.
Gaz. 79, 371-374, 1995.
Bailey, D. H. "Numerical Results on the Transcendence of Constants Involving

,

, and Euler's Constant."
Math. Comput. 50, 275-281, 1988a.
Bailey, D. H.; Borwein, P.; and Plouffe, S. "On the Rapid Computation of Various Polylogarithmic Constants." Math. Comput. 66, 903-913,
1997.
Beukers, F. "A Rational Approximation to

."
Nieuw
Arch. Wisk. 5, 372-379, 2000.
Borwein, J. M. and Borwein, P. B. "Ramanujan's Rational and Algebraic Series for

."
Indian J. Math. 51,
147-160, 1987b.
Borwein, J. M. and Borwein, P. B. "Class Number Three Ramanujan Type Series for

."
J. Comput. Appl. Math. 46,
281-290, 1993.
Borwein, J. M.; Borwein, P. B.; and Bailey, D. H. "Ramanujan, Modular
Equations, and Approximations to Pi, or How to Compute One Billion
Digits
of Pi." Amer. Math. Monthly 96, 201-219, 1989.
Borwein, J. M.; Borwein, D.; and Galway, W. F. "Finding and Excluding

-ary Machin-Type Individual Digit Formulae."
Canad. J. Math. 56, 897-925, 2004.
Castellanos, D. "The Ubiquitous Pi. Part I." Math. Mag. 61,
67-98, 1988a.
Castellanos, D. "The Ubiquitous Pi. Part II." Math. Mag. 61,
148-163, 1988b.
Chudnovsky, D. V. and Chudnovsky, G. V. "Approximations and Complex Multiplication According to Ramanujan." In
Ramanujan
Revisited: Proceedings of the Centenary Conference, University of Illinois at Urbana-Champaign,
June 1-5, 1987 (Ed. G. E. Andrews, B. C. Berndt, and
R. A. Rankin). Boston, MA: Academic Press, pp. 375-472, 1987.
Dalzell, D. P. "On 22/7." J. London Math. Soc. 19, 133-134,
1944.
Dalzell, D. P. "On 22/7 and 355/113." Eureka 34, 10-13,
1971.
Ferguson, H. R. P.; Bailey, D. H.; and Arno, S. "Analysis of PSLQ, An Integer Relation Finding Algorithm." Math. Comput. 68,
351-369, 1999.
Gasper, G. "Re: confluent pi." math-fun@cs.arizona.edu posting, Aug. 18, 1996.
Gosper, R. W. math-fun@cs.arizona.edu posting, Sept. 1996.
Gosper, R. W. "a product." math-fun@cs.arizona.edu posting,
Sept. 27, 1996.
Guillera, J. "Some Binomial Series Obtained by the WZ-Method." Adv.
Appl. Math. 29, 599-603, 2002.
Guillera, J. "About a New Kind of Ramanujan-Type Series." Exp. Math. 12,
507-510, 2003.
Guillera, J. "Generators of Some Ramanujan Formulas." Ramanujan J. 11,
41-48, 2006.
Hardy, G. H. "A Chapter from Ramanujan's Note-Book." Proc. Cambridge
Philos. Soc. 21, 492-503, 1923.
Hardy, G. H. "Some Formulae of Ramanujan." Proc. London Math. Soc.
(Records of Proceedings at Meetings) 22, xii-xiii, 1924.
Lucas, S. K. "Integral Proofs that

."
Austral. Math. Soc. Gaz. 32, 263-266, 2005.
Rabinowitz, S. and Wagon, S. "A Spigot Algorithm for the Digits of

."
Amer.
Math. Monthly 102, 195-203, 1995.
Ramanujan, S. "Modular Equations and Approximations to

."
Quart.
J. Pure. Appl. Math. 45, 350-372, 1913-1914.
Sloane, N. J. A. Sequences
A054387 and
A054388 in "The On-Line Encyclopedia
of Integer Sequences."
Sondow, J. "Problem 88." Math Horizons, pp. 32 and 34, Sept. 1997.
Sondow, J. "A Faster Product for

and a New Integral
for

."
Amer. Math. Monthly 112,
729-734, 2005.
Vieta, F. Uriorum de rebus mathematicis responsorum. Liber VII. 1593. Reprinted
in New York: Georg Olms, pp. 398-400 and 436-446, 1970.
Referenced on Wolfram|Alpha:
Pi Formulas
CITE THIS AS: