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 50 results. Next

A004112 Numbers k where |cos(k)| (or |cosec(k)| or |cot(k)|) decreases monotonically to 0; also numbers k where |tan(k)| (or |sec(k)|, or |sin(k)|) increases.

Original entry on oeis.org

0, 1, 2, 5, 8, 11, 344, 699, 1054, 1409, 1764, 2119, 2474, 2829, 3184, 3539, 3894, 4249, 4604, 4959, 5314, 5669, 6024, 6379, 6734, 7089, 7444, 7799, 8154, 8509, 8864, 9219, 9574, 9929, 10284, 10639, 10994, 11349, 11704, 12059, 12414, 12769, 13124, 13479, 13834
Offset: 1

Views

Author

Keywords

Comments

a(100), a(1000), and a(10000) have 5, 215, and 221 digits, respectively. - Jon E. Schoenfield, Nov 08 2019
a(n) is also the smallest nonnegative integer k such that k mod Pi is closer to Pi/2 than any previous term. - Colin Linzer, Apr 27 2022

Examples

			After the 151st term, the sequence continues 51819, 52174, 260515, 573204, 4846147, ...
|cos(4846147)| = 0.000000255689511369808141413171..., |cosec(4846147)| = 1.00000000000003268856311..., or |cot(4846147)| = 0.000000255689511369816499535901...
|tan(4846147)| = 3910993.43356970986068082..., |sec(4846147)| = 3910993.43356983770543651..., |sin(4846147)| = 0.999999999999967311436888...
		

Crossrefs

Programs

  • Mathematica
    a = -1; Do[b = N[ Abs[ Tan[n]], 24]; If[b > a, Print[n]; a = b], {n, 0, 13833}]
  • PARI
    e=2;for(n=0,1e9,abs(cos(n))M. F. Hasler, Apr 01 2013

Extensions

More terms from Olivier Gérard
Edited by Robert G. Wilson v, Jan 28 2003

A068089 Decimal expansion of 104348 / 33215.

Original entry on oeis.org

3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 9, 2, 1, 4, 2, 1, 0, 4, 4, 7, 0, 8, 7, 1, 5, 9, 4, 1, 5, 9, 2, 6, 5, 3, 9, 2, 1, 4, 2, 1, 0, 4, 4, 7, 0, 8, 7, 1, 5, 9, 4, 1, 5, 9, 2, 6, 5, 3, 9, 2, 1, 4, 2, 1, 0, 4, 4, 7, 0, 8, 7, 1, 5, 9, 4, 1, 5, 9, 2, 6, 5, 3, 9, 2, 1, 4, 2, 1, 0, 4, 4, 7, 0, 8, 7, 1, 5, 9, 4, 1, 5, 9, 2, 6, 5
Offset: 1

Views

Author

Nenad Radakovic, Mar 22 2002

Keywords

Comments

This is an approximation to Pi. It is accurate to 0.00000001056%.

Crossrefs

Programs

  • Mathematica
    First[RealDigits[104348/33215,10,100]] (* Paolo Xausa, Nov 07 2023 *)

Extensions

More terms from Sascha Kurz, Mar 23 2002

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.

A096456 Numerators of convergents to Pi/2.

Original entry on oeis.org

1, 2, 3, 11, 344, 355, 51819, 52174, 260515, 573204, 4846147, 5419351, 37362253, 42781604, 122925461, 411557987, 534483448, 2549491779, 3083975227, 17969367914, 21053343141, 881156436695, 902209779836, 2685575996367
Offset: 1

Views

Author

N. J. A. Sloane, Aug 16 2004

Keywords

Examples

			1, 2, 3/2, 11/7, 344/219, 355/226, ...
		

Crossrefs

Cf. A096463 (denominators), A053300.
Cf. A002485 (numerators of convergents to Pi).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Pi/2, n]]], {n, 1, 25}] (* Stefan Steinerberger, Mar 18 2006 *)
  • PARI
    contfracpnqn(c=contfrac(Pi/2),#c)[1,] \\ M. F. Hasler, Oct 13 2020

Extensions

More terms from Stefan Steinerberger, Mar 18 2006

A355622 a(n) is the n-digit positive number with no trailing zeros and coprime to its digital reversal R(a(n)) at which abs(a(n)/R(a(n))-Pi) is minimized.

Original entry on oeis.org

1, 92, 581, 5471, 52861, 998713, 7774742, 93630892, 422334431, 9190135292, 45425395441, 472539314051, 5784475521481, 49371008251751, 939253175379892, 9265811239939492, 52949745472445861, 952186420153090303, 9836241210282790313, 36386277546811128511, 442327789252803797041
Offset: 1

Views

Author

Stefano Spezia, Jul 10 2022

Keywords

Comments

a(n) and R(a(n)) have the same number of digits.
Petr Beckmann wrote that the fraction 92/29, corresponding to the second term of the sequence, appeared as value of Pi in a document written in A.D. 718.

Examples

			n              fraction    approximated value
-   -------------------    ------------------
1                     1    1
2                 92/29    3.1724137931034...
3               581/185    3.1405405405405...
4             5471/1745    3.1352435530086...
5           52861/16825    3.1418127786033...
6         998713/317899    3.1416047235128...
7       7774742/2474777    3.1415929596889...
8     93630892/29803639    3.1415926088757...
9   422334431/134433224    3.1415926690860...
...
		

References

  • Petr Beckmann, A History of Pi, 3rd Ed., Boulder, Colorado: The Golem Press (1974): p. 27.

Crossrefs

Cf. A355623 (denominator or digital reversal).

Programs

  • Mathematica
    nmax=9; a={}; For[n=1, n<=nmax, n++, minim=Infinity; For[k=10^(n-1), k<=10^n-1, k++, If[(dist=Abs[k/FromDigits[Reverse[IntegerDigits[k]]]-Pi]) < minim && Last[IntegerDigits[k]]!=0 && GCD[k,FromDigits[Reverse[IntegerDigits[k]]]]==1, minim=dist; kmin=k]]; AppendTo[a, kmin]]; a

Extensions

a(10)-a(19) from Bert Dobbelaere, Jul 17 2022
a(20)-a(21) from Bert Dobbelaere, Sep 05 2022

A355623 a(n) is the n-digit positive number with no trailing zeros and coprime to its digital reversal R(a(n)) at which abs(R(a(n))/a(n)-Pi) is minimized.

Original entry on oeis.org

1, 29, 185, 1745, 16825, 317899, 2474777, 29803639, 134433224, 2925310919, 14459352454, 150413935274, 1841255744875, 15715280017394, 298973571352939, 2949399321185629, 16854427454794925, 303090351024681259, 3130972820121426389, 11582111864577268363, 140797308252987723244
Offset: 1

Views

Author

Stefano Spezia, Jul 10 2022

Keywords

Comments

a(n) and R(a(n)) have the same number of digits.
Petr Beckmann wrote that the fraction 92/29, corresponding to the second term of the sequence, appeared as value of Pi in a document written in A.D. 718.

Examples

			n              fraction    approximated value
-   -------------------    ------------------
1                     1    1
2                 92/29    3.1724137931034...
3               581/185    3.1405405405405...
4             5471/1745    3.1352435530086...
5           52861/16825    3.1418127786033...
6         998713/317899    3.1416047235128...
7       7774742/2474777    3.1415929596889...
8     93630892/29803639    3.1415926088757...
9   422334431/134433224    3.1415926690860...
...
		

References

  • Petr Beckmann, A History of Pi, 3rd Ed., Boulder, Colorado: The Golem Press (1974): p. 27.

Crossrefs

Cf. A355622 (numerator or digital reversal).

Programs

  • Mathematica
    nmax=9; a={}; For[n=1, n<=nmax, n++, minim=Infinity; For[k=10^(n-1), k<=10^n-1, k++, If[(dist=Abs[FromDigits[Reverse[IntegerDigits[k]]]/k-Pi]) < minim && Last[IntegerDigits[k]]!=0 && GCD[k,FromDigits[Reverse[IntegerDigits[k]]]]==1, minim=dist; kmin=k]]; AppendTo[a, kmin]]; a

Extensions

a(10)-a(19) from Bert Dobbelaere, Jul 17 2022
a(20)-a(21) from Bert Dobbelaere, Sep 05 2022

A265735 Integers in the interval [Pi*k - 1/k, Pi*k + 1/k] for some k > 0.

Original entry on oeis.org

3, 4, 6, 19, 22, 44, 66, 88, 333, 355, 710, 1065, 1420, 1775, 2130, 2485, 2840, 3195, 3550, 3905, 4260, 4615, 4970, 5325, 5680, 6035, 103993, 104348, 208341, 312689, 521030, 833719, 1146408, 2292816, 4272943, 5419351, 10838702, 16258053, 80143857, 85563208
Offset: 1

Views

Author

Michel Lagneau, Dec 15 2015

Keywords

Comments

Conjecture: the sequence is infinite.
See the reference for a similar problem with Fibonacci numbers.
For k > 1, the interval [Pi*k - 1/k, Pi*k + 1/k] contains exactly one integer.
The corresponding integers k are 1, 2, 6, 7, 14, 21, 28,...(see A265739).
We observe two properties:
(1) a(n) = m*a(n-m+1) for some n, m=2,3,4.
Examples:
m = 2 => a(7)=2*a(6), a(11)=2*a(10), a(15)=2*a(14), a(20)=2*a(19), a(25)=2*a(24), a(30)=2*a(29),...
m = 3 => a(16)=3*a(14), a(21)=3*a(19), a(26)=3*a(24), a(31)=3*a(29),...
m = 4 => a(4)=4*a(1), a(32)=4*a(29), ...
But, for m=5, the formula (1) is not valid. We find a(13)=5*a(9), a(18)=5*a(10), a(23)=5*a(11), ...
(2) a(n+2) = a(n) + a(n+1) for n = 4, 9, 26, 27, 28, 29, 35, ...
For k > 1, the integer satisfying the definition is such that ceiling(Pi*k - 1/k) = floor(Pi*k + 1/k). - Stefano Spezia, Apr 26 2023

Examples

			For k=1 there exists two integers a(1)=3 and a(2)=4 in the interval [1*Pi -1/1, 1*Pi + 1/1] = [2.14159...,4.14159...];
for k=2, the number a(3)=6 is in the interval [2*Pi-1/2, 2*Pi+1/2] = [5.783185..., 6.783185...];
for k=6, the number a(4)= 19 is in the interval [6*Pi-1/6, 6*Pi+1/6] = [18.682889..., 19.016223...].
		

Crossrefs

Cf. A000796, A265739. Contains A002485 (without the first two terms) as a subsequence.

Programs

  • Maple
    *** the program gives the interval [a,b],a(n) and k ***
    nn:=10^9:
    for n from 1 to nn do:
    x1:=evalhf(Pi*n-1/n):y1:=evalhf(Pi*n+1/n):
    x:=floor(x1):y:=floor(y1):
    for j from x+1 to y do:
    printf("%g %g %d %d\n",x1,y1,j,n):
    od:
    od:
  • Mathematica
    kmax=10^9; Flatten[Table[Range[Ceiling[Pi k-1/k], Floor[Pi k+1/k]], {k, kmax}]] (* or limiting memory usage *)
    a = {3,4}; kmax = 10^9; For[k = 1, k <= kmax, k++,
     If[(nw = Ceiling[Pi k - 1/k]) == Floor[Pi k + 1/k],
      AppendTo[a, nw]]]; a (* Stefano Spezia, Apr 26 2023 *)

A325158 Numerators of convergents to Pi using best rational approximation whose denominator is between consecutive powers of 2: [2^n, 2^(n+1)-1], where n = 0, 1, 2, ...

Original entry on oeis.org

3, 6, 22, 44, 66, 179, 355, 710, 1065, 1775, 3550, 6745, 13135, 25915, 102928, 104348, 312689, 625378, 1146408, 3126535, 5419351, 10838702, 16258053, 47627751, 80143857, 165707065, 411557987, 657408909, 1068966896, 2549491779, 6167950454, 12335900908, 21053343141, 42106686282
Offset: 0

Views

Author

Serguei Zolotov, Apr 04 2019

Keywords

Examples

			The convergents are 3/1, 6/2, 22/7, 44/14, 66/21, 179/57, 355/113, 710/226, 1065/339, 1775/565, 3550/1130, 6745/2147, 13135/4181, 25915/8249, 102928/32763, ... = A325158/A325159.
		

Crossrefs

Cf. A325159 (denominators), A002485.
Previous Showing 11-20 of 50 results. Next