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
|
(1)
| |||
|
(2)
|
Similarly, for a sphere of radius
, the surface area
and volume enclosed are
|
(3)
| |||
|
(4)
|
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
|
(6)
| |||
|
(7)
|
(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
|
(10)
| |||
|
(11)
| |||
|
(12)
| |||
|
(13)
| |||
|
(14)
| |||
|
(15)
| |||
|
(16)
| |||
|
(17)
|
(Wells 1986, p. 53).
In 1666, Newton used a geometric construction to derive the formula
|
(18)
| |||
|
(19)
|
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
|
(20)
| |||
|
(21)
|
by taking the series expansion of
about
0, obtaining
|
(22)
|
(OEIS A054387 and A054388). Using Euler's convergence improvement transformation gives
|
(23)
| |||
|
(24)
| |||
|
(25)
|
(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
|
(32)
| |||
|
(33)
| |||
|
(34)
| |||
![]() |
(35)
| ||
![]() |
(36)
| ||
![]() |
(37)
|
Similarly, there are a series of BBP-type formulas for
in powers of
, the first few
independent formulas of which are
|
(38)
| |||
|
(39)
| |||
![]() |
(40)
| ||
![]() |
(41)
| ||
![]() |
(42)
| ||
![]() |
(43)
| ||
![]() |
(44)
| ||
![]() |
(45)
| ||
![]() |
(46)
| ||
![]() |
(47)
| ||
![]() |
(48)
|
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
|
(52)
| |||
|
(53)
| |||
|
(54)
|
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
![]() |
(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
![]() |
(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
![]() |
(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
![]() |
(60)
| ||
|
(61)
|
(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
![]() |
(68)
|
with
(J. Munkhammar, pers.
comm., April 27, 2000). The formula
![]() |
(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
|
(72)
|
(Wells 1986, p. 50). This formula can also be written
![]() |
(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
|
(77)
| |||
|
(78)
|
(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
|
(80)
|
where
is a binary
quadratic form discriminant,
is the j-function,
|
(81)
| |||
|
(82)
|
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
|
(83)
| |||
|
(84)
|
(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),
|
(85)
|
where
|
(86)
| |||
|
(87)
| |||
|
(88)
|
The best formula for class number 2 (largest discriminant
) is
|
(89)
|
where
|
(90)
| |||
|
(91)
| |||
|
(92)
|
(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
![]() |
(94)
| ||
![]() |
(95)
| ||
![]() |
(96)
|
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),
![]() |
(97)
| ||
![]() |
(98)
| ||
![]() |
(99)
| ||
![]() |
(100)
| ||
![]() |
(101)
| ||
![]() |
(102)
| ||
![]() |
(103)
| ||
![]() |
(104)
| ||
![]() |
(105)
| ||
![]() |
(106)
| ||
![]() |
(107)
| ||
![]() |
(108)
| ||
![]() |
(109)
| ||
![]() |
(110)
| ||
![]() |
(111)
| ||
![]() |
(112)
| ||
![]() |
(113)
|
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
![]() |
(114)
| ||
![]() |
(115)
| ||
![]() |
(116)
| ||
![]() |
(117)
| ||
![]() |
(118)
|
for
with nonalternating signs,
![]() |
(119)
| ||
![]() |
(120)
| ||
![]() |
(121)
| ||
![]() |
(122)
|
for
with alternating signs,
![]() |
(123)
| ||
![]() |
(124)
|
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
![]() |
(126)
|
where
|
(127)
|
Gasper quotes the result
|
(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.


![sum_(k=0)^(infty)(-1)^k[3/(14k+1)-3/(14k+3)+3/(14k+5)+4/(14k+7)+4/(14k+9)-4/(14k+11)+4/(14k+13)]](/images/equations/PiFormulas/Inline101.gif)
![sum_(k=0)^(infty)(-1)^k[2/(18k+1)+3/(18k+3)+2/(18k+5)-2/(18k+7)-2/(18k+11)+2/(18k+13)+3/(18k+15)+2/(18k+17)]](/images/equations/PiFormulas/Inline104.gif)
![sum_(k=0)^(infty)(-1)^k[3/(22k+1)-3/(22k+3)+3/(22k+5)-3/(22k+7)+3/(22k+9)+8/(22k+11)+3/(22k+13)-3/(22k+15)+3/(22k+17)-3/(22k+19)+1/(22k+21)].](/images/equations/PiFormulas/Inline107.gif)
![1/(16)sum_(k=0)^(infty)1/(256^k)[(64)/(16k+1)-(32)/(16k+4)-(16)/(16k+5)-(16)/(16k+6)+4/(16k+9)-2/(16k+12)-1/(16k+13)-1/(16k+14)]](/images/equations/PiFormulas/Inline118.gif)
![1/(32)sum_(k=0)^(infty)1/(256^k)[(128)/(16k+2)+(64)/(16k+3)+(64)/(16k+4)-(16)/(16k+7)+8/(16k+10)+4/(16k+11)+4/(16k+12)-1/(16k+15)]](/images/equations/PiFormulas/Inline121.gif)
![1/(32)sum_(k=0)^(infty)1/(4096^k)[(256)/(24k+2)+(192)/(24k+3)-(256)/(24k+4)-(96)/(24k+6)-(96)/(24k+8)+(16)/(24k+10)-4/(24k+12)-3/(24k+15)-6/(24k+16)-2/(24k+18)-1/(24k+20)]](/images/equations/PiFormulas/Inline124.gif)
![1/(64)sum_(k=0)^(infty)1/(4096^k)[(256)/(24k+1)+(256)/(24k+2)-(384)/(24k+3)-(256)/(24k+4)-(64)/(24k+5)+(96)/(24k+8)+(64)/(24k+9)+(16)/(24k+10)+8/(24k+12)-4/(24k+13)+6/(24k+15)+6/(24k+16)+1/(24k+17)+1/(24k+18)-1/(24k+20)-1/(24k+21)]](/images/equations/PiFormulas/Inline127.gif)
![1/(96)sum_(k=0)^(infty)1/(4096^k)[(256)/(24k+2)+(64)/(24k+3)+(128)/(24k+5)+(352)/(24k+6)+(64)/(24k+7)+(288)/(24k+8)+(128)/(24k+9)+(80)/(24k+10)+(20)/(24k+12)-(16)/(24k+14)-1/(24k+15)+6/(24k+16)-2/(24k+17)-1/(24k+19)+1/(24k+20)-2/(24k+21)]](/images/equations/PiFormulas/Inline130.gif)
![1/(96)sum_(k=0)^(infty)1/(4096^k)[(256)/(24k+1)+(320)/(24k+3)+(256)/(24k+4)-(192)/(24k+5)-(224)/(24k+6)-(64)/(24k+7)-(192)/(24k+8)-(64)/(24k+9)-(64)/(24k+10)-(28)/(24k+12)-4/(24k+13)-5/(24k+15)+3/(24k+17)+1/(24k+18)+1/(24k+19)+1/(24k+21)-1/(24k+22)]](/images/equations/PiFormulas/Inline133.gif)
![1/(96)sum_(k=0)^(infty)1/(4096^k)[(512)/(24k+1)-(256)/(24k+2)+(64)/(24k+3)-(512)/(24k+4)-(32)/(24k+6)+(64)/(24k+7)+(96)/(24k+8)+(64)/(24k+9)+(48)/(24k+10)-(12)/(24k+12)-8/(24k+13)-(16)/(24k+14)-1/(24k+15)-6/(24k+16)-2/(24k+18)-1/(24k+19)-1/(24k+20)-1/(24k+21)]](/images/equations/PiFormulas/Inline136.gif)
![1/(4096)sum_(k=0)^(infty)1/(65536^k)[(16384)/(32k+1)-(8192)/(32k+4)-(4096)/(32k+5)-(4096)/(32k+6)+(1024)/(32k+9)-(512)/(32k+12)-(256)/(32k+13)-(256)/(32k+14)+(64)/(32k+17)-(32)/(32k+20)-(16)/(32k+21)-(16)/(32k+22)+4/(32k+25)-2/(32k+28)-1/(32k+29)-1/(32k+30)]](/images/equations/PiFormulas/Inline139.gif)
![1/(4096)sum_(k=0)^(infty)1/(65536^k)[(32768)/(32k+2)+(16384)/(32k+3)+(16384)/(32k+4)-(4096)/(32k+7)+(2048)/(32k+10)+(1024)/(32k+11)+(1024)/(32k+12)-(256)/(32k+15)+(128)/(32k+18)+(64)/(32k+19)+(64)/(32k+20)-(16)/(32k+23)+8/(32k+26)+4/(32k+27)+4/(32k+28)-1/(32k+31)].](/images/equations/PiFormulas/Inline142.gif)

![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)]](/images/equations/PiFormulas/NumberedEquation15.gif)
![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))]](/images/equations/PiFormulas/NumberedEquation16.gif)
![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](/images/equations/PiFormulas/NumberedEquation17.gif)

![2/(product_(n=1)^(infty)[1+(sin(1/2pip_n))/(p_n)])](/images/equations/PiFormulas/Inline174.gif)


![pi_n=sqrt((1/2pi_(n-1))^2+[1-sqrt(1-(1/2pi_(n-1))^2)]^2)](/images/equations/PiFormulas/NumberedEquation25.gif)
![pi=2lim_(m->infty)sum_(n=1)^msqrt([sqrt(1-((n-1)/m)^2)-sqrt(1-(n/m)^2)]^2+1/(m^2))](/images/equations/PiFormulas/NumberedEquation26.gif)

![lim_(n->infty)(2^(4n))/(n(2n; n)^2)=pilim_(n->infty)(n[Gamma(n)]^2)/([Gamma(1/2+n)]^2)=pi,](/images/equations/PiFormulas/NumberedEquation30.gif)

































![pi=1/(740025)[sum_(n=1)^infty(3P(n))/((7n; 2n)2^(n-1))-20379280],](/images/equations/PiFormulas/NumberedEquation40.gif)
figure eight knot



