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

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

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

A063673 Denominators of convergents to Pi by Farey fractions.

Original entry on oeis.org

1, 4, 5, 6, 7, 57, 64, 71, 78, 85, 92, 99, 106, 113, 16604, 16717, 16830, 16943, 17056, 17169, 17282, 17395, 17508, 17621, 17734, 17847, 17960, 18073, 18186, 18299, 18412, 18525, 18638, 18751, 18864, 18977, 19090, 19203, 19316, 19429, 19542, 19655, 19768, 19881, 19994, 20107, 20220, 20333, 20446, 20559, 20672, 20785
Offset: 1

Views

Author

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

Keywords

Comments

Previous name: Denominators of 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, ... } of approximations to Pi with increasing denominators, where each approximation is an improvement on its predecessors.
Pi = 3.1415926... is an irrational number and can't be exactly represented by a fraction with rational numerator and denominators. The fraction 355/113 is so accurate that improves the approximation of Pi by five significant digits over the previous 333/106. To find a slightly more accurate approximation we have to go to 52163 / 16604. - Sergio Pimentel, Sep 13 2005
The approximations 22/7 and 355/113 were already known by Zu Chongzhi (5th century) and A. Metius, 1585. (Thanks to P. Curtz for this remark.) - M. F. Hasler, Apr 03 2013
The approximation 355/113 was used by S. Ramanujan in the paper "Squaring the circle" to give a geometrical construction of a square whose area is approximately equal to that of a circle. See links. - Juan Monterde, Jul 26 2013
The sequence uses Farey fractions instead of continued fractions. - Robert G. Wilson v, May 10 2020

Examples

			333/106 = 3.1415094... is 99.99% accurate;
355/113 = 3.1415929... is 99.99999% accurate.
		

Crossrefs

Programs

  • Mathematica
    FareyConvergence[x_, n_] := Block[{n1 = 0, d1 = n9 = d9 = 1, F = 0, fp = FractionalPart@ x, lst}, $MaxExtraPrecision = Max[50, n + 10]; lst = If[2 fp > 1, {Ceiling@ x}, {Floor@ x}]; While[d1 + d9 < n, a1 = n1/d1; a9 = n9/d9; n0 = n1 + n9; d0 = d1 + d9; a0 = n0/d0; If[a0 < fp, a1 = a0; n1 = n0; d1 = d0, a9 = a0; n9 = n0; d9 = d0]; If[Abs[fp - F] > Abs[fp - a0], F = a0; AppendTo[lst, a0 + IntegerPart@ x]]]; lst]; Denominator@ FareyConvergence[Pi, 10^10] (* Robert G. Wilson v, May 11 2020 *)
  • PARI
    A063673(limit)= my(best=Pi-3, tmp); for(n=1,limit, tmp=abs(round(Pi*n)/n-Pi); if(tmpCharles R Greathouse IV, Aug 23 2006
    (APL (NARS2000)) B⍸∪⌊\B←|(○1)-(⌊.5+○A)÷A←⍳100000 \\ Michael Turniansky, Jun 09 2015

Extensions

More terms from Charles R Greathouse IV, Aug 23 2006
More terms from M. F. Hasler, Apr 03 2013
Name simplified by Robert G. Wilson v, May 11 2020

A132050 Denominator of 2*n*A000111(n-1)/A000111(n): approximations of Pi using Euler (up/down) numbers.

Original entry on oeis.org

1, 1, 1, 5, 8, 61, 136, 1385, 3968, 50521, 176896, 2702765, 260096, 199360981, 951878656, 19391512145, 104932671488, 2404879675441, 14544442556416, 74074237647505, 2475749026562048, 69348874393137901, 507711943253426176
Offset: 1

Views

Author

Wolfdieter Lang, Sep 14 2007

Keywords

Comments

The rationals r(n)=2*n*e(n-1)/e(n), where e(n)=A000111(n), approximate Pi as n -> oo. - M. F. Hasler, Apr 03 2013
Numerators are given in A132049.
See the Delahaye reference and a link by W. Lang given in A132049.
From Paul Curtz, Mar 17 2013: (Start)
Apply the Akiyama-Tanigawa transform (or algorithm) to A046978(n+2)/A016116(n+1):
1, 1/2, 0, -1/4, -1/4, -1/8, 0, 1/16, 1/16;
1/2, 1, 3/4, 0, -5/8, -3/4, -7/16, 0; = Balmer0(n)
-1/2, 1/2, 9/4, 5/2, 5/8, -15/8, -49/16;
-1, -7/2, -3/4, 15/2, 25/2, 57/8;
5/2, -11/2, -99/4, -20, 215/8;
8, 77/2, -57/4, -375/2;
-61/2, 211/2, 2079/4;
-136, -1657/2;
1385/2;
The first column is PIEULER(n) = 1, 1/2, -1/2, -1, 5/2, 8, -61/2, -136, 1385/2,... = c(n)/d(n). Abs c(n+1)=1,1,1,5,8,61,... =a(n) with offset=1.
For numerators of Balmer0(n) see A076109, A000265 and A061037(n-1) (End).
Other completely unrelated rational approximations of Pi are given by A063674/A063673 and other references there. - M. F. Hasler, Apr 03 2013

Examples

			Rationals r(n): [2, 4, 3, 16/5, 25/8, 192/61, 427/136, 4352/1385, 12465/3968, 158720/50521, ...].
		

Crossrefs

Cf. triangle A008281 (main diagonal give zig-zag numbers A000111).

Programs

  • Mathematica
    e[n_] := If[EvenQ[n], Abs[EulerE[n]], Abs[(2^(n + 1)*(2^(n + 1) - 1)*BernoulliB[n + 1])/(n + 1)]]; r[n_] := 2*n*(e[n - 1]/e[n]); a[n_] := Denominator[r[n]]; Table[a[n], {n, 1, 23}] (* Jean-François Alcover, Mar 26 2013 *)
  • Python
    from itertools import count, islice, accumulate
    from fractions import Fraction
    def A132050_gen(): # generator of terms
        yield 1
        blist = (0,1)
        for n in count(2):
            yield Fraction(2*n*blist[-1],(blist:=tuple(accumulate(reversed(blist),initial=0)))[-1]).denominator
    A132050_list = list(islice(A132050_gen(),40)) # Chai Wah Wu, Jun 09-11 2022

Formula

a(n)=denominator(r(n)) with the rationals r(n):=2*n*e(n-1)/e(n) where e(n):=A000111(n).

Extensions

Definition made more explicit, and initial terms a(1)=a(2)=1 added by M. F. Hasler, Apr 03 2013

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
Showing 1-6 of 6 results.