cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A001203 Simple continued fraction expansion of Pi.

Original entry on oeis.org

3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2, 1, 84, 2, 1, 1, 15, 3, 13, 1, 4, 2, 6, 6, 99, 1, 2, 2, 6, 3, 5, 1, 1, 6, 8, 1, 7, 1, 2, 3, 7, 1, 2, 1, 1, 12, 1, 1, 1, 3, 1, 1, 8, 1, 1, 2, 1, 6, 1, 1, 5, 2, 2, 3, 1, 2, 4, 4, 16, 1, 161, 45, 1, 22, 1, 2, 2, 1, 4, 1, 2, 24, 1, 2, 1, 3, 1, 2, 1
Offset: 0

Views

Author

Keywords

Comments

The first 5821569425 terms were computed by Eric W. Weisstein on Sep 18 2011.
The first 10672905501 terms were computed by Eric W. Weisstein on Jul 17 2013.
The first 15000000000 terms were computed by Eric W. Weisstein on Jul 27 2013.
The first 30113021586 terms were computed by Syed Fahad on Apr 27 2021.

Examples

			Pi = 3.1415926535897932384...
   = 3 + 1/(7 + 1/(15 + 1/(1 + 1/(292 + ...))))
   = [a_0; a_1, a_2, a_3, ...] = [3; 7, 15, 1, 292, ...].
		

References

  • P. Beckmann, "A History of Pi".
  • C. Brezinski, History of Continued Fractions and Padé Approximants, Springer-Verlag, 1991; pp. 151-152.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 186.
  • J. R. Goldman, The Queen of Mathematics, 1998, p. 50.
  • R. S. Lehman, A Study of Regular Continued Fractions. Report 1066, Ballistic Research Laboratories, Aberdeen Proving Ground, Maryland, Feb 1959.
  • G. Lochs, Die ersten 968 Kettenbruchnenner von Pi. Monatsh. Math. 67 1963 311-316.
  • C. D. Olds, Continued Fractions, Random House, NY, 1963; front cover of paperback edition.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 274.

Crossrefs

Cf. A000796 for decimal expansion. See A007541 or A033089, A033090 for records.

Programs

  • Maple
    cfrac (Pi,70,'quotients'); # Zerinvary Lajos, Feb 10 2007
  • Mathematica
    ContinuedFraction[Pi, 98]
  • PARI
    contfrac(Pi) \\ contfracpnqn(%) is also useful!
    
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(Pi); for (n=1, 20000, write("b001203.txt", n, " ", x[n])); } \\ Harry J. Smith, Apr 14 2009
    
  • Python
    import itertools as it; import sympy as sp
    list(it.islice(sp.continued_fraction_iterator(sp.pi),100))
    # Nicholas Stefan Georgescu, Feb 27 2023
  • Sage
    continued_fraction(RealField(333)(pi)) # Peter Luschny, Feb 16 2015
    

Extensions

Word "Simple" added to the title by David Covert, Dec 06 2016

A033090 Indices of incrementally largest terms in the continued fraction for Pi.

Original entry on oeis.org

1, 2, 3, 5, 308, 432, 28422, 156382, 267314, 453294, 11504931, 849955263, 2349980289, 3588031780, 8600404591, 15621034283
Offset: 1

Views

Author

Keywords

Comments

This sequence assumes nonstandard indexing of continued fraction terms as [a_1; a_2, a_3, ...]. If you use the actual offset from A001203, corresponding to [a_0; a_1, a_2, ...], you get instead 0, 1, 2, 4, 307, 431, 28421, ... Compare with A033092 versus A224849. - Jeppe Stig Nielsen, Dec 14 2019

Crossrefs

Programs

  • Mathematica
    With[{s = ContinuedFraction[Pi, 2*10^7]}, Map[FirstPosition[s, #][[1]] &, Union@ FoldList[Max, s]]] (* Michael De Vlieger, Jan 31 2020 *)

Extensions

a(12) from Eric W. Weisstein, Dec 08 2010
a(13) from Eric W. Weisstein, Sep 16 2011
a(14) from Eric W. Weisstein, Sep 17 2011
a(15) from Eric W. Weisstein, Jul 18 2013
a(16) from Syed Fahad, Apr 27 2021

A154883 Distinct entries in continued fraction for Pi in the order of their appearance.

Original entry on oeis.org

3, 7, 15, 1, 292, 2, 14, 84, 13, 4, 6, 99, 5, 8, 12, 16, 161, 45, 22, 24, 10, 26, 42, 9, 57, 18, 19, 30, 28, 20, 120, 23, 21, 127, 29, 11, 48, 436, 58, 34, 44, 20776, 94, 55, 32, 50, 43, 72, 33, 27, 36, 106, 17, 141, 39, 125, 41, 37, 25, 47, 61, 376, 107, 31
Offset: 1

Views

Author

Lee Corbin (lcorbin(AT)rawbw.com), Jan 16 2009

Keywords

Comments

This is presumably a permutation of the positive integers. The inverse permutation (or "index sequence") A322778 begins 4,6,1,10,13,11,2,14,... and gives the position in the continued fraction of Pi at which 1, 2, 3, 4, 5, 6, ... first appear. - Remark corrected by N. J. A. Sloane, Jan 04 2019
The name means that when a number not yet in this sequence appears in the continued fraction of Pi, then that number is added to the sequence. - T. D. Noe, May 06 2013

Examples

			Since the actual continued fraction for Pi is 3, 7, 15, 1, 292, 1, 1, 1, 2, ..., this sequence begins 3, 7, 15, 1, 292, 2, ...
		

Crossrefs

Cf. A001203, A033089 (for records of main continued fraction), A322778 (inverse), A033090.

Programs

  • Mathematica
    DeleteDuplicates[ContinuedFraction[Pi,1000]] (* Harvey P. Dale, May 06 2013 *)
    t = {}; s = ContinuedFraction[Pi, 1000]; Do[If[! MemberQ[t, s[[n]]], AppendTo[t, s[[n]]]], {n, Length[s]}]; t (* T. D. Noe, May 06 2013 *)
  • PARI
    \p 10000
    v=contfrac(Pi); for(i=1,#v,for(j=1,i-1,if(v[i]==v[j],v[i]=0;break))); v=select(n->n,v) \\ Charles R Greathouse IV, May 06 2013

Extensions

More terms from Harvey P. Dale, May 05 2013

A007541 Incrementally largest terms in the continued fraction for Pi-2 (cf. A001203).

Original entry on oeis.org

1, 7, 15, 292, 436, 20776, 78629, 179136, 528210, 12996958, 878783625, 5408240597, 5916686112, 9448623833, 9787547328, 52662113289
Offset: 1

Views

Author

Keywords

Comments

No larger term in the first 10,672,905,501 terms of the c.f. - Eric W. Weisstein, Jul 18 2013

References

  • R. W. Gosper, Jr., Table of the simple continued fraction for pi and the derived decimal approximation, Math. Comp., 31 (1977), 1044.
  • R. W. Gosper, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • See A001203 for many additional references and links.

Crossrefs

Apart from initial term, same as A033089.

Programs

  • Mathematica
    upto=10^7;a={};r=0;f=ContinuedFraction[Pi-2,upto];Do[If[f[[i]]>r,AppendTo[a,r=f[[i]]]],{i, upto}];a (* Paolo Xausa, Nov 28 2021 *)
  • PARI
    allocatemem(4096*10^6);
    default(realprecision, 50000);
    v = contfrac(Pi-2);
    m = 0;
    for (i=1, #v, if (v[i] > m, m = v[i]; print1(m, ", "))); \\ Michel Marcus, Aug 05 2017; to get 7 terms

Extensions

Corrected (missing a(9) added) by Eric W. Weisstein, Dec 08 2010
a(12) from Eric W. Weisstein, Dec 08 2010
a(13) from Eric W. Weisstein, Sep 16 2011
a(14) from Eric W. Weisstein, Sep 17 2011
a(15) from Eric W. Weisstein, Jul 18 2013
a(6) corrected by Bobby Jacobs, Aug 05 2017
a(16) = A033089(16) from Jeppe Stig Nielsen, Nov 28 2021

A203168 Positions of 1 in the continued fraction expansion of Pi.

Original entry on oeis.org

4, 6, 7, 8, 10, 12, 15, 16, 21, 24, 25, 29, 35, 41, 42, 45, 47, 51, 53, 54, 56, 57, 58, 60, 61, 63, 64, 66, 68, 69, 74, 79, 82, 84, 87, 89, 92, 94, 96, 98, 99, 104, 108, 113, 115, 116, 121, 125, 126, 134, 136, 138, 141, 144, 148, 149, 150, 154, 157, 158, 160
Offset: 1

Views

Author

Ben Branman, Dec 29 2011

Keywords

Comments

In the Gauss-Kuzmin distribution, 1 appears with probability log_2(4/3) = 41.5037...%. Thus the n-th appearance of 1 in the continued fraction of a real number chosen uniformly from [0, 1) will be, with probability 1, n / (log_2(4/3)) + O(sqrt(n)). Does this sequence have the same asymptotic? - Charles R Greathouse IV, Dec 30 2011

Crossrefs

Programs

  • Mathematica
    Flatten[Position[ContinuedFraction[Pi, 160], 1]]
  • PARI
    v=contfrac(Pi);for(i=1,#v,if(v[i]==1,print1(i", "))) \\ Charles R Greathouse IV, Dec 30 2011

Formula

A001203(a(n)) = 1.
Showing 1-5 of 5 results.