Pi Continued Fraction

DOWNLOAD Mathematica Notebook PiContinuedFractionBinaryPlot

The simple continued fraction for pi is given by [3; 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, ...] (OEIS A001203). A plot of the first 256 terms of the continued fraction represented as a sequence of binary bits is shown above.

The first few convergents are 3, 22/7, 333/106, 355/113, 103993/33102, 104348/33215, ... (OEIS A002485 and A002486), which are good to 0, 2, 4, 6, 9, 9, 9, 10, 11, 11, 12, 13, ... (OEIS A114526) decimal digits, respectively.

The very large term 292 means that the convergent

 [3;7,15,1]=[3,7,16]=(355)/(113)=3.14159292...
(1)

is an extremely good approximation good to six decimal places that was first discovered by astronomer Tsu Ch'ung-Chih in the fifth century A.D. (Gardner 1966, pp. 91-102). A nice expression for the third convergent of pi is given by

 pi approx 2[1;1,1,3,32]=(355)/(113) approx 3.14159292...
(2)

(Stoschek).

The Engel expansion of pi is 1, 1, 1, 8, 8, 17, 19, 300, 1991, 2492, ... (OEIS A006784).

The following table summarizes some record computations of the continued fraction of pi.

termsdatereference
170013031977W. Gosper (Gosper 1977, Ball and Coxeter 1987)
20000000Jun. 1999H. Havermann (Plouffe)
180×10^6Mar. 2002H. Havermann (Bickford)
458×10^6Oct. 2010N. Bickford (Bickford 2010, Wolfram Blog Team 2011)
1940535772Dec. 2010E. W. Weisstein
2910789567Sep. 16, 2011E. W. Weisstein
4851308496Sep. 17, 2011E. W. Weisstein
5821569425Sep. 18, 2011E. W. Weisstein
10672905501Jul. 18, 2013E. W. Weisstein
15000000000Jul. 27, 2013E. W. Weisstein

The positions of the first occurrence of n=1, 2, ... in the continued fraction are 3, 8, 0, 29, 39, 31, 1, 43, 129, 99, ... (OEIS A225802). The smallest integers which does not occur in the first 1.5×10^(10) terms are 49004, 50471, 53486, 56315, ... (E. Weisstein, Jul. 27, 2013). The sequence of increasing terms in the continued fraction is 3, 7, 15, 292, 436, 20776, 78629, 179136, 528210, 12996958, 878783625, 5408240597, 5916686112, 9448623833, ... (OEIS A033089), occurring at positions 1, 2, 3, 5, 308, 432, 28422, 156382, 267314, 453294, 11504931 ... (OEIS A033090)

PiKhinchinLevy

Let the continued fraction of pi be denoted [a_0;a_1,a_2,...] and let the denominators of the convergents be denoted q_1, q_2, ..., q_n. Then plots above show successive values of a_1^(1/1), (a_1a_2)^(1/2), (a_1a_2...a_n)^(1/n), which appear to converge to Khinchin's constant (left figure) and q_n^(1/n), which appear converge to the Lévy constant (right figure), although neither of these limits has been rigorously established.

The following table gives the first few occurrences of d-digit terms in the continued fraction of pi, counting 3 as the 0th (e.g., Choong et al. 1971, Beeler et al. 1972).

dSloaneterms/positions
1A0482923, 7, 1, 1, 1, 1, 2, 1, 3, 1, 2, 1, 1, 2, ...
A0482930, 1, 3, 5, 6, 7, 8, 9, 10, 11, 13, 14, ...
2A04829415, 14, 84, 15, 13, 99, 12, 16, 45, 22, ...
A0489552, 12, 21, 25, 27, 33, 54, 77, 80, 82, ...
3A048956292, 161, 120, 127, 436, 106, 141, ...
A0489574, 79, 196, 222, 307, 601, 669, 725, ...
4A0489581722, 2159, 8277, 1431, 1282, 2050, ...
A0489593273, 3777, 3811, 4019, 4700, 6209, ...
5A04896020776, 19055, 19308, 78629, 17538, ...
A048961431, 15543, 23398, 28421, 51839, ...
6179136, 528210, 104293, 196030, ...
156381, 267313, 294467, 513205, ...
78093211, 1811791, 3578547, 4506503, ...
1118727, 2782369, 2899883, 3014261, ...
812996958 ,19626118, 12051Q034, 13435395, ...
453293, 27741604, 46924606, 50964645, ...
9878783625, 317579569, ...
11504930, 74130513, ...

The simple continued fraction for pi does not show any obvious patterns, but clear patterns do emerge in the beautiful non-simple continued fractions

 4/pi=1+(1^2)/(2+(3^2)/(2+(5^2)/(2+(7^2)/(2+...))))
(3)

(Brouncker), giving convergents 1, 3/2, 15/13, 105/76, 315/263, ... (OEIS A025547 and A007509) and

 pi/2=1-1/(3-(2·3)/(1-(1·2)/(3-(4·5)/(1-(3·4)/(3-(6·7)/(1-(5·6)/(3-...)))))))
(4)

(Stern 1833), giving convergents 1, 2/3, 4/3, 16/15, 64/45, 128/105, ... (OEIS A001901 and A046126).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.