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.

Previous Showing 11-20 of 39 results. Next

A072398 Numerator of best approximation to Pi with denominator <= 10^n.

Original entry on oeis.org

3, 22, 22, 355, 355, 312689, 1146408, 5419351, 245850922, 2549491779, 21053343141, 21053343141, 1783366216531, 8958937768937, 139755218526789, 428224593349304, 30246273033735921, 66627445592888887
Offset: 0

Views

Author

Rick L. Shepherd, Jun 15 2002

Keywords

Examples

			A072398(5) = 312689 because A072398(5)/A072399(5) = 312689/99532 is the best rational approximation to Pi with positive denominator <= 10^5 = 100000. This approximation is accurate to 0.00000000092766%.
		

Crossrefs

Cf. A072399 (denominators), A000796 (Pi), A068089, A002485/A002486.

Programs

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

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.

A079938 Greedy frac multiples of Pi: a(1)=1, Sum_{n>=1} frac(a(n)*Pi) = 1.

Original entry on oeis.org

1, 2, 3, 8, 99, 33102, 66317, 265381, 1360120, 25510582, 78256779, 156513558, 209259755, 340262731, 1963319607, 6701487259, 8664806866, 13402974518, 20104461777, 26805949036, 33507436295, 40208923554, 46910410813
Offset: 1

Views

Author

Benoit Cloitre and Paul D. Hanna, Jan 21 2003

Keywords

Comments

The n-th greedy frac multiple of x is the smallest integer that does not cause Sum_{k=1..n} frac(a(k)*x) to exceed unity; an infinite number of terms appear as the denominators of the convergents to the continued fraction of x.

Examples

			a(4) = 8 since frac(1x*) + frac(2*x) + frac(3*x) + frac(8*x) < 1, while frac(1*x) + frac(2*x) + frac(3*x) + frac(k*x) > 1 for all k > 3 and k < 8.
		

Crossrefs

Cf. A002486 (denominators of convergents to Pi), A079934, A079937, A079939.

Programs

  • Maple
    Digits := 100: a := []: s := 0: x := Pi: for n from 1 to 10000000 do: temp := evalf(s+frac(n*x)): if (temp<1.0) then a := [op(a),n]: print(n): s := s+evalf(frac(n*x)): fi: od: a;
  • PARI
    first(n)=my(v=vector(n),s=1.,p=Pi-3,k); for(m=1,oo, my(t=frac(p*m)); if(tCharles R Greathouse IV, Jul 25 2024

Extensions

a(9) from Mark Hudson, Jan 30 2003
a(10)-a(23) from Charles R Greathouse IV, Jul 26 2024

A360367 a(n) is the denominator of the rational number with the smallest denominator that lies within 1/10^n of Pi.

Original entry on oeis.org

1, 7, 7, 64, 106, 113, 113, 24175, 32085, 33102, 99532, 265381, 1360120, 1725033, 18610450, 25510582, 78256779, 340262731, 811528438, 1963319607, 6701487259, 6701487259, 413528890451, 554260122890, 1142027682075, 2851718461558, 2851718461558, 41633749241295, 91822653867264
Offset: 0

Views

Author

Stefano Spezia, Feb 04 2023

Keywords

Examples

			The rational numbers are 3, 22/7, 22/7, 201/64, 333/106, 355/113, 355/113, 75948/24175, ...
		

Crossrefs

Cf. A360366 (numerator), A360368, A360369, A360370.

Programs

  • Mathematica
    Table[Denominator[Rationalize[Pi,10^(-n)]],{n,0,28}]

A156020 Denominators in an infinite sum for Pi.

Original entry on oeis.org

1, 106, 877203, 2195225334, 17599271777, 360950005720, 17348726394920, 1996375977735378, 26627865341803449, 668044491303666717, 13157161331655387213, 7653283960850915182425, 3256741424583567733172850, 388712386741794886666062286, 266182386623377135274423955447
Offset: 1

Views

Author

Keywords

Comments

For k >= 0, define Q(k) = A002485(2k)/A002486(2k) (convergents to Pi that are less than Pi), so Pi = Sum_{k>=1} (Q(k) - Q(k-1)). Then a(n) is the denominator of Q(n) - Q(n-1).

Examples

			a(2) = 106 since A002485(4)/A002486(4) = 333/106, A002485(2)/A002486(2) = 3/1, and 333/106 - 3/1 = 15/106 (see table below).
Pi = 3/1 + 15/106 + 73/877203 + 1/2195225334 + 2/17599271777 + 3/360950005720 + 7/17348726394920 + ....
.
  n  Q(n) = A002485(2n)/A002486(2n)  Q(n) - Q(n-1)    a(n)
  -  ------------------------------  -------------  ------
  0       0/1     = 0                     -              -
  1       3/1     = 3                    3/1             1
  2     333/106   = 3.1415094339...     15/106         106
  3  103993/33102 = 3.1415926530...     73/877203   877203
		

Crossrefs

Cf. A002485, A002486, A156019 (numerators).

Programs

Formula

a(n) = denominator(A002485(2n)/A002486(2n) - A002485(2n-2)/A002486(2n-2)).

Extensions

More terms from Alexander R. Povolotsky, Sep 01 2009
More terms from Michel Marcus, Jan 05 2022

A156618 Denominators of Egyptian fraction for Pi-3 whose partial sums are the convergents.

Original entry on oeis.org

7, -742, 11978, -3740526, 1099482930, -2202719155, 6600663644, -26413901692, 96840976853, -496325469560, 2346251883960, -44006595799206, 1345586183756654, -4127747481719463, 10251870941174304
Offset: 0

Views

Author

Jaume Oliver Lafont, Feb 11 2009

Keywords

Comments

Numerators are all 1.

Examples

			3+1/a(0)=22/7
3+1/a(0)+1/a(1)=333/106
3+1/a(0)+1/a(1)+1/a(2)=355/113
		

Crossrefs

Programs

  • PARI
    c0=3; for (k=2,30,m=contfracpnqn(contfrac(Pi,k));c1=m[1,1]/m[2,1];print1(1/(c1-c0),", ");c0=c1;)

A036417 Values of k for which there are no empty intervals when fractional part(m*Pi) for m = 1, ..., k is plotted along [ 0, 1 ] subdivided into k equal regions.

Original entry on oeis.org

1, 6, 7, 106, 112, 113, 33102, 33215, 66317, 99532, 165849, 265381, 364913
Offset: 1

Views

Author

Keywords

Comments

Appears to include all the denominators of the convergents of Pi A002486. - Eric W. Weisstein, Apr 18 2024
No other terms with n <= 10^6. - Eric W. Weisstein, Apr 27 2024

Crossrefs

Cf. A036416.
Cf. A002486 (denominators of the convergents of Pi).

Programs

  • Mathematica
    With[{f = FractionalPart[Pi Range[1000]]}, Position[Table[Count[BinCounts[Take[f, n], {0., 1, 1/n}], 0], {n, Length[f]}], 0]] // Flatten (* Eric W. Weisstein, Apr 27 2024 *)

Extensions

a(9)-a(10) from Sean A. Irvine, Oct 31 2020
a(11)-a(13) from Eric W. Weisstein, Apr 18-19 2024

A120701 Number of unit circles which fit touching a circle of radius n-1, i.e., with their centers on a circle of radius n.

Original entry on oeis.org

2, 6, 9, 12, 15, 18, 21, 25, 28, 31, 34, 37, 40, 43, 47, 50, 53, 56, 59, 62, 65, 69, 72, 75, 78, 81, 84, 87, 91, 94, 97, 100, 103, 106, 109, 113, 116, 119, 122, 125, 128, 131, 135, 138, 141, 144, 147, 150, 153, 157, 160, 163, 166, 169, 172, 175, 179, 182, 185, 188
Offset: 1

Views

Author

Martin Fuller, Jun 28 2006

Keywords

Comments

Coincides with A022844 = floor(n*Pi) except at n=1, 25510582, ... (sequence A120702).

Crossrefs

Programs

  • Magma
    R:= RealField(30); [Floor(Pi(R)/Arcsin(1/n)) : n in [1..70]]; // G. C. Greubel, Aug 25 2023
  • Mathematica
    Table[Floor[Pi/ArcSin[1/n]], {n, 60}] (* Indranil Ghosh, Jul 21 2017 *)
  • Python
    from mpmath import mp, pi, asin
    mp.dps=100
    def a(n): return int(floor(pi/asin(1./n)))
    print([a(n) for n in range(1, 61)]) # Indranil Ghosh, Jul 21 2017
    
  • SageMath
    [floor(pi/arcsin(1/n)) for n in range(1,71)] # G. C. Greubel, Aug 25 2023
    

Formula

a(n) = floor(Pi/arcsin(1/n)).

A120702 Values of n where A022844(n) = floor(n*Pi) differs from A120701(n) = floor(Pi/arcsin(1/n)).

Original entry on oeis.org

1, 25510582, 78256779, 340262731, 1963319607, 6701487259, 1142027682075, 2851718461558, 136308121570117, 1952799169684491, 21208174623389167, 842468587426513207, 84383735478118508040, 589001211171976529866
Offset: 1

Views

Author

Martin Fuller, Jun 28 2006

Keywords

Comments

Subsequence of A002486.

Crossrefs

Programs

  • PARI
    default(realprecision,1000); isok(n) = floor(n*Pi) != floor(Pi/asin(1/n)); \\ Michel Marcus, Jan 17 2018

Extensions

More terms from Max Alekseyev, Feb 22 2012
Previous Showing 11-20 of 39 results. Next