TOPICS
Search

Pi Digits


pi has decimal expansion given by

 pi=3.141592653589793238462643383279502884197...
(1)

(OEIS A000796). The following table summarizes some record computations of the digits of pi.

2061584300001999Kanada, Ushio and Kuroda
1.2411×10^(12)Dec. 2002Kanada, Ushio and Kuroda (Peterson 2002, Kanada 2003)
5×10^(12)Aug. 2012A. J. Yee (Yee)
10×10^(12)Aug. 2012S. Kondo and A. J. Yee (Yee)
12.1×10^(12)Dec. 2013A. J. Yee and S. Kondo (Yee)

The calculation of the digits of pi has occupied mathematicians since the day of the Rhind papyrus (1500 BC). Ludolph van Ceulen spent much of his life calculating pi to 35 places. Although he did not live to publish his result, it was inscribed on his gravestone. Wells (1986, p. 48) discusses a number of other calculations. The calculation of pi also figures in the Season 2 Star Trek episode "Wolf in the Fold" (1967), in which Captain Kirk and Mr. Spock force an evil entity (composed of pure energy and which feeds on fear) out of the starship Enterprise's computer by commanding the computer to "compute to the last digit the value of pi," thus sending the computer into an infinite loop.

Al-Kāshi of Samarkand computed the sexagesimal digits of 2pi as

 2pi=6.(16)(59)(28)(01)(34)(51)(46)(14)(50)_(60)...
(2)

(OEIS A091649) using 3·2^(28)-gons, a value accurate to 17 decimal places (Borwein and Bailey 2003, p. 107).

Pi digits

The binary representation of the decimal digits of pi (top figure) and decimal representation (bottom figure) of pi are illustrated above.

Pi digits mod 2

A plot of the first 1600 decimal digits of pi (mod 2) is shown above (left figure), with the corresponding plot for 22/7 shown at right. Here, white indicates an even digit and black an odd digit (Pickover 2002, p. 285).

Spigot (Rabinowitz and Wagon 1995; Arndt and Haenel 2001; Borwein and Bailey 2003, pp. 140-141) and base-16 digit-extraction algorithms (the BBP formula) are known for pi. A remarkable recursive formula conjectured to give the nth hexadecimal digit of pi-3 is given by d_n=|_16x_n_|, where |_x_| is the floor function,

 x_n=frac(16x_(n-1)+(120n^2-89n+16)/(512n^4-1024n^3+712n^2-206n-21)),
(3)

frac(x) is the fractional part and x_0=0 (Borwein and Bailey 2003, Ch. 4; Bailey et al. 2007, pp. 22-23).

The limit pi formulas

 lim_(n->infty)((2(-1)^(n+1)(2n)!)/(2^(2n)B_(2n)))^(1/(2n))=pi,
(4)

and

 lim_(n->infty)((2(-1)^(n+1)(2n)!)/(2^(2n)B_(2n)(1-2^(-n))(1-3^(-n))(1-5^(-n))(1-7^(-n))))^(1/(2n))=pi,
(5)

where B_n is a Bernoulli number (Plouffe 2022) can be used as a digit-extraction algorithm for pi (as well as pi^n). In particular, letting

 pi_n=((2(-1)^(n+1)(2n)!)/(2^(2n)B_(2n)(1-2^(-n))(1-3^(-n))(1-5^(-n))(1-7^(-n))))^(1/(2n)),
(6)

the nth digit to the right of the decimal point of pi for n>=3 is given by

 d_n=int(10frac(10^(n-1)pi_(n-1)))
(7)

where int(x) is the integer part and frac(x) is the fractional part. Similar formulas can be obtained using

 lim_(n->infty)((2^(2n+2)(-1)^n(2n)!)/(E_(2n)))^(1/(2n+1))=pi
(8)

and

 lim_(n->infty)((2^(2n+2)(-1)^n(2n)!)/(E_(2n))(1-1/(3^(2n+1))))^(1/(2n+1))=pi,
(9)

where E_n is an Euler number, which gives a base-9 (or binary) digit-extraction algorithm (Plouffe 2022). Related limits and formulas can also be obtained for pi^2 (Plouffe 2022).

Pi-primes, i.e., pi-constant primes occur at 2, 6, 38, 16208, 47577, 78073, 613373, ... (OEIS A060421) decimal digits.

The beast number 666 appears in pi-3 at decimals 2440, 3151, 4000, 4435, 5403, 6840, (OEIS A083625). The first occurrences of just n consecutive 6s are 7, 117, 2440, 21880, 48439, 252499, 8209165, 55616210, 45681781, ... (OEIS A096760), while n (or more) consecutive 6s first occur at 7, 117, 2440, 21880, 48439, 252499, 8209165, 45681781, 45681781, ... (OEIS A050285).

The digits 314159 appear at positions 176451, 1259351, 1761051, 6467324, 6518294, 9753731, 9973760, ... (correcting Pickover 1995).

The sequence 0123456789 occurs beginning at digits 17387594880, 26852899245, 30243957439, 34549153953, 41952536161, and 43289964000 (OEIS A101815; cf. Wells 1986, pp. 51-52).

The sequence 9876543210 occurs beginning at digits 21981157633, 29832636867, 39232573648, 42140457481, and 43065796214 (OEIS A101816).

The sequence 27182818284 (the first few digits of e) occurs beginning at digit 45111908393 (see also Pickover's sequence).

There are also interesting patterns for 1/pi. 0123456789 occurs at 6214876462, 9876543210 occurs at 15603388145 and 51507034812, and 999999999999 occurs at 12479021132 of 1/pi.

The starting positions of the first occurrence of n=0, 1, 2, ... in the decimal expansion of pi (including the initial 3 and counting it as the first digit) are 33, 2, 7, 1, 3, 5, 8, 14, ... (OEIS A032445).

Scanning the decimal expansion of pi until all n-digit numbers have occurred, the last 1-, 2-, ... digit numbers appearing are 0, 68, 483, 6716, 33394, 569540, ... (OEIS A032510), which end at digits 33, 607, 8556, 99850, 1369565, ... (OEIS A080597).

A curiosity relating pi to the beast number 666 involves adding the first three sextads of pi. First, note that

 141592+653589+793238=1588419.
(10)

Now, skip ahead 15 decimal places and note that the sum is repeated as

 3.141592 653589 793238 462643383279502^(︷)^(15) 88419 71693
(11)

(pers. comm., P. Olivera, Aug. 11, 2005; Olivera).

It is not known if pi is normal (Wagon 1985, Bailey and Crandall 2001), although the first 30 million digits are very uniformly distributed (Bailey 1988).

The following distribution of decimal digits d is found for the first 10^n digits of pi-3 (Kanada 2003). It shows no statistically significant departure from a uniform distribution.

nOEIS23456789101112
0A0992918939689999999599994409999922999939429999679951000010475099999485134
1A09929281161026101379975899933310002475999973341000037790999993763199999945664
2A0992931210310219908100026100030610001092100002410100001727110000026432100000480057
3A0992941110297410025100229999964999844299986911999976483999991239699999787805
4A09929510931012997110023010010931000386310001195899993768810000032702100000357857
5A09929689710461002610035910004669993478999988851000007928999996366199999671008
6A099297994102110029995489993379999417100010387999985731999982408899999807503
7A0992988959701002599800100020799996109999606110000413301000008453099999818723
8A099299121019489978999859998141000218010000183999999177210000157175100000791469
9A0993001410610149902100106100004099995211000002731000036012999995663599999854780

The following table gives the first few positions at which a digit d occurs n times. The sequence 1, 135, 1698, 54525, 24466, 252499, 3346228, 46663520, 564665206, ... (OEIS A061073) given by the diagonal (plus any terms of the form 10 10's etc.) is known as the Earls sequence (Pickover 2002, p. 339). The sequence 999999 occurs at decimal 762 (which is sometimes called the Feynman point; Wells 1986, p. 51) and continues as 9999998, which is largest value of any seven digits in the first million decimals.

dOEISstrings of 1, 2, ...ds first occur at
0A05027932, 307, 601, 13390, 17534, 1699927, ...
1A0351171, 94, 153, 12700, 32788, 255945, ...
2A0502816, 135, 1735, 4902, 65260, 963024, ...
3A0502829, 24, 1698, 28467, 28467, 710100, ...
4A0502832, 59, 2707, 54525, 808650, 828499, ...
5A0502844, 130, 177, 24466, 24466, 244453, ...
6A0502857, 117, 2440, 21880, 48439, 252499, ...
7A05028613, 559, 1589, 1589, 162248, 399579, ...
8A05028711, 34, 4751, 4751, 213245, 222299, ...
9A0489405, 44, 762, 762, 762, 762, 1722776, ...

See also

Constant Digit Scanning, Constant Primes, Earls Sequence, Pi, Pi Approximations, Pi Continued Fraction, Pi Formulas, Pickover's Sequence

Explore with Wolfram|Alpha

References

Adamchik, V. and Wagon, S. "A Simple Formula for pi." Amer. Math. Monthly 104, 852-855, 1997.Anderson, D. "The Pi-Search Page." http://www.angio.net/pi/piquery.Arndt, J. and Haenel, C. Pi--Unleashed, 2nd ed. Berlin: Springer-Verlag, 2001.Bailey, D. H. "The Computation of pi to 29360000 Decimal Digit using Borwein's' Quartically Convergent Algorithm." Math. Comput. 50, 283-296, 1988.Bailey, D. H.; Borwein, J. M.; Calkin, N. J.; Girgensohn, R.; Luke, D. R.; and Moll, V. H. Experimental Mathematics in Action. Wellesley, MA: A K Peters, 2007.Bailey, D. H.; Borwein, P. B.; and Plouffe, S. "On the Rapid Computation of Various Polylogarithmic Constants." Math. Comput. 66, 903-913, 1997.Bailey, D. H. and Crandall, R. E. "On the Random Character of Fundamental Constant Expansions." Exper. Math. 10, 175-190, 2001. http://www.nersc.gov/~dhbailey/dhbpapers/baicran.pdf.Borwein, J. M. "Talking About Pi." http://www.cecm.sfu.ca/personal/jborwein/pi_cover.html.Borwein, J. and Bailey, D. Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters, 2003.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.Caldwell, C. K. and Dubner, H. "Primes in Pi." J. Recr. Math. 29, 282-289, 1998.Gibbs, W. W. "A Digital Slice of Pi. The New Way to do Pure Math: Experimentally." Sci. Amer. 288, 23-24, May 2003.Gourdon, X. and Sebah, P. "PiFast: The Fastest Program to Compute Pi." http://numbers.computation.free.fr/Constants/PiProgram/pifast.html.Kanada, Y. "New World Record of Pi: 51.5 Billion Decimal Digits." http://www.cecm.sfu.ca/personal/jborwein/Kanada_50b.html.Update a linkKanada, Y. "Our Latest Record." Sep. 20, 1999. ftp://www.cc.u-tokyo.ac.jp/README.our_latest_recordKanada, Y. "Sample Digits for Decimal Digits of Pi." Jan. 18, 2003. http://www.super-computing.org/pi-decimal_current.html.Le Lionnais, F. Les nombres remarquables. Paris: Hermann, pp. 22 and 50, 1983.National Energy Research Scientific Computing Center. "Search pi." http://pi.nersc.gov/.Olivera, P. "brief Description of Events About How I Found a Curious Pattern in Pi, Many Years Ago, While Searching for Patterns and Sequences." http://www.geocities.com/pi_curiosity/englishstory.html.Peterson, I. "Pick a Digit, Any Digit." Sci. News Online, Feb. 28, 1998. http://www.sciencenews.org/sn_arc98/2_28_98/mathland.htm.Peterson, I. "Pi by the Billions." Sci. News 156, 255, Oct. 16, 1999.Peterson, I. "Pi à la mode." Sci. News 160, 136-137, Sep. 1, 2001. http://www.sciencenews.org/20010901/bob9.asp.Peterson, I. "A Passion for Pi." In Mathematical Treks: From Surreal Numbers to Magic Circles. Washington, DC: Math. Assoc. Amer., 2001.Peterson, I. "MathTrek: A Trillion Pieces of Pi." Dec. 14, 2002. http://www.sciencenews.org/20021214/mathtrek.asp.Pickover, C. A. Keys to Infinity. New York: Wiley, p. 62, 1995.Pickover, C. A. The Mathematics of Oz: Mental Gymnastics from Beyond the Edge. New York: Cambridge University Press, pp. 284-285, 2002.Plouffe, S. "Table of Current Records for the Computation of Constants." http://pi.lacim.uqam.ca/eng/records_en.html.Plouffe, S. "A Formula for the n'th Decimal Digit or Binary of pi and pi^n." https://arxiv.org/abs/2201.12601. 29 Jan 2022.Rabinowitz, S. and Wagon, S. "A Spigot Algorithm for the Digits of pi." Amer. Math. Monthly 102, 195-203, 1995.Sloane, N. J. A. Sequences A000796/M2218, A032150, A032445, A035117, A036903, A036974, A037000, A037001, A037002, A037003, A037004, A037005, A037006, A037007, A037008, A048940, A050201, A050202, A050203, A050208, A050209, A050215, A050222, A050230, A050238, A050245, A050254, A050263, A050272, A050279, A050281, A050282, A050283, A050284, A050285, A050286, A050287, A060421, A061073, A080597, A083625, A091649, A096760, A099291, A099292, A099293, A099294, A099295, A099296, A099297, A099298, A099299, A099300, A101815, and A101816 in "The On-Line Encyclopedia of Integer Sequences."Smith, H. J. "Computing Pi." http://www.geocities.com/hjsmithh/Pi.html.Wagon, S. "Is pi Normal?" Math. Intel. 7, 65-67, 1985.Wells, D. The Penguin Dictionary of Curious and Interesting Numbers. Middlesex, England: Penguin Books, p. 46, 1986.Wrench, J. W. Jr. "The Evolution of Extended Decimal Approximations to pi." Math. Teacher 53, 644-650, 1960.Yee, A. J. "y-cruncher - A Multi-Threaded Pi-Program." http://www.numberworld.org/y-cruncher/.

Cite this as:

Weisstein, Eric W. "Pi Digits." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/PiDigits.html

Subject classifications