TOPICS
Search

Pi Continued Fraction


pi continued fraction binary plot

The pi continued fraction is the expansion of pi as a simple continued fraction, 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 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 convergent 355/113 of pi is given by

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

(Stoschek, undated).

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

The following table summarizes historical record computations through 2013 of the continued fraction of pi.

termsdatereference
170013031977W. Gosper (Gosper 1977, Ball and Coxeter 1987)
20000000Jun. 1999H. Havermann (Plouffe 2000)
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
30113021586Apr. 27, 2021S. Fahad (Fahad 2021)
653520000000Nov. 1, 2025M. Frank (Frank 2025)

The positions of the first occurrence of n=1, 2, ... in the continued fraction, counting the initial 3 as position 0, are 3, 8, 0, 29, 39, 31, 1, 43, 129, 99, ... (OEIS A225802). The smallest integers which do not occur in the first 1.5×10^(10) terms are 49004, 50471, 53486, 56315, ... (E. Weisstein, Jul. 27, 2013). The sequence of successive record partial quotients 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), here counting the initial 3 as position 1. The largest term among the first 653520000000 terms computed by Frank (2025) is 845188380288.

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 to 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).

dOEISterms/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, 12051034, 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)

(Khrushchev 2006), obtained by Brouncker in 1655 and 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, pp. 267-268), giving convergents 1, 2/3, 4/3, 16/15, 64/45, 128/105, ... (OEIS A001901 and A046126).


See also

Euler-Mascheroni Constant Continued Fraction, Pi, Pi Approximations, Pi Digits, Pi Formulas

Explore with Wolfram|Alpha

References

Ball, W. W. R. and Coxeter, H. S. M. Mathematical Recreations and Essays, 13th ed. New York: Dover, p. 55 and 274, 1987.Beeler, M.; Gosper, R. W.; and Schroeppel, R. Item 140 in HAKMEM. Cambridge, MA: MIT Artificial Intelligence Laboratory, Memo AIM-239, Feb. 1972. https://www.inwap.com/pdp10/hbaker/hakmem/pi.html#item140.Bickford, N. "Pi." Oct. 22, 2010. https://nbickford.wordpress.com/2010/10/22/pi/.Choong, K. Y.; Daykin, D. E.; and Rathbone, C. R. "Rational Approximations to pi." Math. Comput. 25, 387-392, 1971. https://doi.org/10.1090/S0025-5718-1971-0300981-0.Fahad, S. "30 Billion Terms of the Simple Continued Fraction of Pi." Apr. 27, 2021. https://drive.google.com/drive/folders/1-Qh9Xxq1i6oeHnTXzKrQ9FoguHreBKy.Frank, M. "653.52 Billion Terms of the Simple Continued Fraction of Pi." Nov. 1, 2025. https://drive.google.com/drive/folders/1ONUoPpIsP6y1_o8dfQuNIVcF4hFKzJSe.Gardner, M. "The Transcendental Number Pi." Ch. 8 in Martin Gardner's New Mathematical Diversions from Scientific American. New York: Simon and Schuster, pp. 91-102, 1966.Gosper, R. W. Table of Simple Continued Fraction for pi and the Derived Decimal Approximation. Stanford, CA: Artificial Intelligence Laboratory, Stanford University, Oct. 1975. Reviewed in Math. Comput. 31, 1044, 1977.Havermann, H. "Simple Continued Fraction Expansion of Pi." http://odo.ca/~haha/cfpi.html.Khrushchev, S. "A Recovery of Brouncker's Proof for the Quadrature Continued Fraction." Publ. Mat. 50, 3-42, 2006. https://doi.org/10.5565/PUBLMAT_50106_01.Lochs, G. "Die ersten 968 Kettenbruchnenner von pi." Monatsh. für Math. 67, 311-316, 1963.Plouffe, S. "Table of Current Records for the Computation of Constants." Jun. 8, 2000. https://www.plouffe.fr/simon/articles/TableofRecords.pdf.Sloane, N. J. A. Sequences A001203/M2646, A001901, A002485/M3097, A002486/M4456, A006784, A007509, A025547, A033089, A033090, A046126, A048292, A048293, A048294, A048955, A048956, A048957, A048958, A048959, A048960, A048961, A114526, and A225802 in "The On-Line Encyclopedia of Integer Sequences."Stern, M. "Theorie der Kettenbrüche und ihre Anwendung. (Fortsetzung)." J. reine angew. Math. 10, 241-274, 1833. https://doi.org/10.1515/crll.1833.10.241. https://gdz.sub.uni-goettingen.de/download/pdf/PPN243919689_0010/LOG_0025.pdf.Stoschek, E. "Modul 33: Algames with Numbers." Undated. Archived Dec. 3, 2000. https://web.archive.org/web/20001203111400/http://marvin.sn.schule.de/~inftreff/modul33/task33.htm.Wolfram Blog Team. "From Pi to Puzzles." Sep. 15, 2011. https://blog.wolfram.com/2011/09/15/from-pi-to-puzzles/.

Referenced on Wolfram|Alpha

Pi Continued Fraction

Cite this as:

Weisstein, Eric W. "Pi Continued Fraction." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/PiContinuedFraction.html

Subject classifications