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-7 of 7 results.

A002485 Numerators of convergents to Pi.

Original entry on oeis.org

0, 1, 3, 22, 333, 355, 103993, 104348, 208341, 312689, 833719, 1146408, 4272943, 5419351, 80143857, 165707065, 245850922, 411557987, 1068966896, 2549491779, 6167950454, 14885392687, 21053343141, 1783366216531, 3587785776203, 5371151992734, 8958937768937
Offset: 0

Views

Author

Keywords

Comments

From Alexander R. Povolotsky, Apr 09 2012: (Start)
K. S. Lucas found, by brute-force search, using Maple programming, several different variants of integral identities which relate each of several first Pi convergents (A002485(n)/A002486(n)) to Pi.
I conjecture the following identity below, which represents a generalization of Stephen Lucas's experimentally obtained identities:
(-1)^n*(Pi-A002485(n)/A002486(n)) = (1/abs(i)*2^j)*Integral_{x=0..1} (x^l*(1-x)^m*(k+(k+i)*x^2)/(1+x^2)) dx where {i, j, k, l, m} are some integers (see the Mathematics Stack Exchange link below). (End)
From a(1)=1 on also: Numbers for which |tan x| decreases monotonically to zero, in the same spirit as A004112, A046947, ... - M. F. Hasler, Apr 01 2013
See also A332095 for n*|tan n| < 1. - M. F. Hasler, Sep 13 2020

Examples

			The convergents are 0, 1, 3, 22/7, 333/106, 355/113, 103993/33102, 104348/33215, 208341/66317, 312689/99532, 833719/265381, 1146408/364913, 4272943/1360120, 5419351/1725033, 80143857/25510582, 165707065/52746197, 245850922/78256779, 411557987/131002976, 1068966896/340262731, 2549491779/811528438,  ... = A002485/A002486
		

References

  • P. Beckmann, A History of Pi. Golem Press, Boulder, CO, 2nd ed., 1971, p. 171 (but beware errors).
  • CRC Standard Mathematical Tables and Formulae, 30th ed. 1996, p. 88.
  • P. Finsler, Über die Faktorenzerlegung natuerlicher Zahlen, Elemente der Mathematik, 2 (1947), 1-11, see p. 7.
  • K. H. Rosen et al., eds., Handbook of Discrete and Combinatorial Mathematics, CRC Press, 2000; p. 293.
  • 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. A002486 (denominators), A046947, A072398/A072399.
Cf. A096456 (numerators of convergents to Pi/2).

Programs

  • Maple
    Digits := 60: E := Pi; convert(evalf(E),confrac,50,'cvgts'): cvgts;
  • Mathematica
    Join[{0, 1}, Numerator @ Convergents[Pi,29]] (* Jean-François Alcover, Apr 08 2011 *)
  • PARI
    contfracpnqn(cf=contfrac(Pi),#cf)[1,] \\ M. F. Hasler, Apr 01 2013, simplified Oct 13 2020
    
  • PARI
    e=9e9;for(n=1,1e9,abs(tan(n)) 0 monotonically. - M. F. Hasler, Apr 01 2013

Extensions

Extended and corrected by David Sloan, Sep 23 2002

A002486 Apart from two leading terms (which are present by convention), denominators of convergents to Pi (A002485 and A046947 give numerators).

Original entry on oeis.org

1, 0, 1, 7, 106, 113, 33102, 33215, 66317, 99532, 265381, 364913, 1360120, 1725033, 25510582, 52746197, 78256779, 131002976, 340262731, 811528438, 1963319607, 4738167652, 6701487259, 567663097408, 1142027682075, 1709690779483, 2851718461558, 44485467702853
Offset: 0

Views

Author

Keywords

Comments

Disregarding first two terms, integer diameters of circles beginning with 1 and a(n+1) is the smallest integer diameter with corresponding circumference nearer an integer than is the circumference of the circle with diameter a(n). See PARI program. - Rick L. Shepherd, Oct 06 2007
a(n+1) = numerator of fraction obtained from truncated continued fraction expansion of 1/Pi to n terms. - Artur Jasinski, Mar 25 2008

Examples

			The convergents are 3, 22/7, 333/106, 355/113, 103993/33102, ...
		

References

  • P. Beckmann, A History of Pi. Golem Press, Boulder, CO, 2nd ed., 1971, p. 171 (but beware errors).
  • CRC Standard Mathematical Tables and Formulae, 30th ed. 1996, p. 88.
  • K. H. Rosen et al., eds., Handbook of Discrete and Combinatorial Mathematics, CRC Press, 2000; p. 293.
  • 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

Programs

  • Maple
    Digits := 60: E := Pi; convert(evalf(E),confrac,50,'cvgts'): cvgts;
    with(numtheory):cf := cfrac (Pi,100): seq(nthdenom (cf,i), i=-2..28 ); # Zerinvary Lajos, Feb 07 2007
  • Mathematica
    Join[{1,0},Denominator[Convergents[Pi,30]]] (* Harvey P. Dale, Sep 13 2013 *)
  • PARI
    for(i=1,#cf=contfrac(Pi),print1(contfracpnqn(vecextract(cf,2^i-1))[2,2]",")) \\ M. F. Hasler, Apr 01 2013

Extensions

Extended and corrected by David Sloan, Sep 23 2002

A063674 Numerators of increasingly better rational approximations to Pi with increasing denominators (3/1, 13/4, 16/5, 19/6, 22/7, 179/57, ...)

Original entry on oeis.org

3, 13, 16, 19, 22, 179, 201, 223, 245, 267, 289, 311, 333, 355, 52163, 52518, 52873, 53228, 53583, 53938, 54293, 54648, 55003, 55358, 55713, 56068, 56423, 56778, 57133, 57488, 57843, 58198, 58553, 58908, 59263, 59618, 59973, 60328, 60683, 61038, 61393, 61748
Offset: 1

Views

Author

Suren L. Fernando (fernando(AT)truman.edu), Jul 27 2001

Keywords

Comments

Numerators of the sequence (3/1, 13/4, 16/5, 19/6, 22/7, 179/57, 201/64, 223/71, 245/78, 267/85, 289/92, 311/99, 333/106, 355/113, 52163/16604, 52518/16717, ...)
Large jumps occur after the classical approximations 22/7 and 355/113, which are sufficiently precise to require a much larger denominator for a better approximation. - M. F. Hasler, Apr 01 2013

Crossrefs

Programs

  • Mathematica
    piapprox[n_] := Block[{a, i}, a = {3/1}; For[i = 2, i <= n, i++, If[Abs[Round[i Pi]/i - Pi] < Abs[Last[a] - Pi], AppendTo[a, Round[i Pi]/i], Null]]; Return[a]] (* Suren Fernando via Alexander R. Povolotsky, Aug 03 2008 *)
  • PARI
    {e=1; for(d=1,1e5, abs( Pi-round(Pi*d)/d ) < e & !print1(round(Pi*d)",") & e=abs(Pi - round(Pi*d)/d))} \\ [M. F. Hasler, Apr 01 2013]

Extensions

More terms from M. F. Hasler, Apr 01 2013

A072399 Denominator of best approximation to Pi with denominator <= 10^n.

Original entry on oeis.org

1, 7, 7, 113, 113, 99532, 364913, 1725033, 78256779, 811528438, 6701487259, 6701487259, 567663097408, 2851718461558, 44485467702853, 136308121570117, 9627687726852338, 21208174623389167, 842468587426513207
Offset: 0

Views

Author

Rick L. Shepherd, Jun 15 2002

Keywords

Examples

			a(6) = 364913 because A072398(6)/a(6) = 1146408/364913 is the best rational approximation to Pi with positive denominator <= 10^6 = 1000000. This approximation is accurate to 0.000000000051271%.
		

Crossrefs

Cf. A072398 (numerators), A000796 (Pi), A068089, A002485/A002486.

Programs

  • Mathematica
    nmax = 18; cv = Convergents[Pi, 2*nmax] // Reverse; a[n_] := Select[cv, Denominator[#] <= 10^n &, 1] // Denominator // First; Table[a[n], {n, 0, nmax}] (* Jean-François Alcover, Jan 04 2013 *)
  • PARI
    for(n=0,40,print1(denominator(bestappr(Pi,10^n)),",")) \\ Finds these approximations very quickly.

A327360 Minimal numerator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi.

Original entry on oeis.org

3, 44, 355, 3195, 99733, 833719, 5419351, 80143857, 657408909, 6167950454, 42106686282, 983339177173, 8958937768937, 94960529682104, 428224593349304, 6134899525417045, 66627445592888887, 430010946591069243, 5293386250278608690, 31760317501671652140
Offset: 1

Views

Author

Jason Zimba, Sep 03 2019

Keywords

Examples

			The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28. The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381.
		

References

  • O. Zelenyak, Programming workshop on Turbo Pascal: Tasks, Algorithms and Solutions, Litres, 2018, page 255. (Provides first 8 terms. Also contains similar sequences for sqrt(2) and e.)

Crossrefs

A327361 gives the corresponding denominators.
Cf. A072398/A072399, which gives the best rational approximation to Pi subject to a different constraint.

Programs

  • Mathematica
    (* Given the 8th term, find the 9th term *)
    (* This took twelve-plus hours to run on a laptop *)
    ResultList = {};
    nVal = 9;
    tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *)
    Do[
      CurrentNumerator = i;
      Do[
       CurrentDenominator = j;
       CurrentQuotient = N[CurrentNumerator/CurrentDenominator];
       If[
        Abs[CurrentQuotient - Pi] <= tol,
        ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}]
        ],
       {j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}],
      {i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}];
    DifferenceList =
      Table[
       Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi],
       {i, 1, Length[ResultList]}];
    Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]]

Extensions

Terms a(10) and beyond from Jon E. Schoenfield, Mar 11 2021

A327361 Minimal denominator among the fractions with n-digit numerator and n-digit denominator that best approximate Pi.

Original entry on oeis.org

1, 14, 113, 1017, 31746, 265381, 1725033, 25510582, 209259755, 1963319607, 13402974518, 313006581566, 2851718461558, 30226875395063, 136308121570117, 1952799169684491, 21208174623389167, 136876735467187340, 1684937174853026414, 10109623049118158484
Offset: 1

Views

Author

Jason Zimba, Sep 03 2019

Keywords

Examples

			The fractions with 2-digit numerators and 2-digit denominators that best approximate Pi are 44/14 and 88/28.
The fraction with 6-digit numerator and 6-digit denominator that best approximates Pi is 833719/265381.
		

References

  • O. Zelenyak, Programming workshop on Turbo Pascal: Tasks, Algorithms and Solutions, Litres, 2018, page 255. (Provides first 8 terms. Also contains similar sequences for sqrt(2) and e.)

Crossrefs

A327360 gives the corresponding numerators.
Cf. A072398/A072399, which gives the best rational approximation to Pi subject to a different constraint.

Programs

  • Mathematica
    (* Given the 8th term, find the 9th term *)
    (* This took twelve-plus hours to run on a laptop *)
    ResultList = {};
    nVal = 9;
    tol = Abs[80143857/25510582 - Pi]; (* 80143857 is A327360(8), 25510582 is A327361(8) *)
    Do[
      CurrentNumerator = i;
      Do[
       CurrentDenominator = j;
       CurrentQuotient = N[CurrentNumerator/CurrentDenominator];
       If[
        Abs[CurrentQuotient - Pi] <= tol,
        ResultList = Append[ResultList, {CurrentNumerator, CurrentDenominator}]
        ],
       {j, Floor[i/(Pi + tol)], Floor[i/(Pi - tol)] + 1}],
      {i, Floor[(Pi - tol)*10^(nVal - 1)], (10^nVal - 1)}];
    DifferenceList =
      Table[
       Abs[ResultList[[i, 1]]/ResultList[[i, 2]] - Pi],
       {i, 1, Length[ResultList]}];
    Extract[ResultList, Position[DifferenceList, Min[DifferenceList]]]

Extensions

a(10)-a(20) from Jon E. Schoenfield, Mar 12 2021

A224365 a(n) = A063674(n+1) - A063674(n).

Original entry on oeis.org

10, 3, 3, 3, 157, 22, 22, 22, 22, 22, 22, 22, 22, 51808, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355
Offset: 1

Views

Author

Paul Curtz, Apr 09 2013

Keywords

Comments

The repeated terms (3, 22, 355, 5419351, ... from A063674) are the numerators of fractions (3/1, 22/7, 355/113, 5419351/1725033, ...) leading to Pi.
Zu Chongzhi (5th century) discovered 22/7 and 355/113. Adriaan Anthonisz Metius rediscovered 355/113 in 1585.
First differences of A063673 give the denominators: 3, 1, 1, 1, 50, 7, 7, 7, 7, 7, 7, 7, 7, 16489, 113, 113, ... .
Hence 10/3, 157/50, 51808/16489, ... .

Crossrefs

Programs

  • Mathematica
    A224365 = Reap[ For[ delta0 = 1; d = 1, d < 10^5, d++, delta = Abs[Pi - Round[Pi*d]/d]; If[ delta < delta0, Sow[ Round[Pi*d]]; delta0 = delta]]][[2, 1]] // Differences (* Jean-François Alcover, Apr 10 2013 *)

Formula

a(n) = A063674(n+1) - A063674(n).
Showing 1-7 of 7 results.