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-10 of 17 results. Next

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

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

A068028 Decimal expansion of 22/7.

Original entry on oeis.org

3, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4
Offset: 1

Views

Author

Nenad Radakovic, Mar 22 2002

Keywords

Comments

This is an approximation to Pi. It is accurate to 0.04025%.
Consider the recurring part of 22/7 and the sequences R(i) = 2, 1, 4, 2, 3, 0, 2, ... and Q(i) = 1, 4, 2, 8, 5, 7, 1, .... For i > 0, let X(i) = 10*R(i) + Q(i). Then Q(i+1) = floor(X(i)/Y); R(i+1) = X(i) - Y*Q(i+1); here Y=5; X(0)=X=7. Note 1/7 = 7/49 = X/(10*Y-1). Similar comment holds elsewhere. If we consider the sequences R(i) = 3, 2, 3, 5, 5, 1, 4, 0, 6, 4, 6, 3, 4, 3, 1, 1, 5, 2, 6, 0, 2, 0, 3, ... and Q(i) = A021027, we have X=3; Y=7 (attributed to Vedic literature). - K.V.Iyer, Jun 16 2010, Jun 18 2010
The sequence of convergents of the continued fraction of Pi begins [3, 22/7, 333/106, 355/113, 103993/33102, ...]. 22/7 is the second convergent. The summation 240*Sum_{n >= 1} 1/((4*n+1)*(4*n+2)*(4*n+3)*(4*n+5)(4*n+6)*(4*n+7)) = 22/7 - Pi shows that 22/7 is an over-approximation to Pi. - Peter Bala, Oct 12 2021

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 187, 239.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.6 The Quest for Pi and §13.3 Solving Triangles, pp. 90, 479.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 49.

Crossrefs

Programs

  • Magma
    I:=[3,1,4,2,8]; [n le 5 select I[n] else Self(n-1)-Self(n-3)+Self(n-4): n in [1..100]]; // Vincenzo Librandi, Mar 27 2015
  • Mathematica
    CoefficientList[Series[(3 - 2 x + 3 x^2 + x^3 + 4 x^4) / ((1 - x) (1 + x) (1 - x + x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Mar 27 2015 *)
    Join[{3},LinearRecurrence[{1, 0, -1, 1},{1, 4, 2, 8},104]] (* Ray Chandler, Aug 26 2015 *)
    RealDigits[22/7,10,120][[1]] (* Harvey P. Dale, Oct 04 2021 *)

Formula

a(0)=3, a(n) = floor(714285/10^(5-(n mod 6))) mod 10. - Sascha Kurz, Mar 23 2002 [corrected by Jason Yuen, Aug 18 2024]
Equals 100*A021018 - 4 = 3 + A020806. - R. J. Mathar, Sep 30 2008
For n>1 a(n) = A020806(n-2) (note offset=0 in A020806 and offset=1 in A068028). - Zak Seidov, Mar 26 2015
G.f.: x*(3-2*x+3*x^2+x^3+4*x^4)/((1-x)*(1+x)*(1-x+x^2)). - Vincenzo Librandi, Mar 27 2015

Extensions

More terms from Sascha Kurz, Mar 23 2002
Alternative to broken link added by R. J. Mathar, Jun 18 2010

A068079 Decimal expansion of 355 / 113.

Original entry on oeis.org

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

Views

Author

Nenad Radakovic, Mar 22 2002

Keywords

Comments

This is an approximation to Pi. It is accurate to 0.00000849%.
355/113 is the third convergent of the continued fraction expansion of Pi (A001203). - Lekraj Beedassy, Jun 18 2003
In one of Ramanujan's papers, a note at the bottom states that "If the area of the circle be 140,000 square miles, then RD [RD = d/2 * Sqrt(355/113) = r*Sqrt(Pi), very nearly] is greater than the true length by about an inch."
This approximation of Pi was suggested by the astronomer Tsu Chúng-chih (A.D. 430 - 501) (see Gullberg). - Stefano Spezia, Jan 13 2025

Examples

			3.141592920353982300884955752212389380530973451327433628318584...
		

References

  • Calvin C. Clawson, Mathematical Mysteries, The Beauty and Magic of Numbers, Perseus Books, 1996, p. 88.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 187, 238-239.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.6 The Quest for Pi, p. 91.
  • Ramanujan's papers, "Squaring the circle", Journal of the Indian Mathematical Society, V, 1913, 132. - Robert G. Wilson v, May 30 2014
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 49.

Crossrefs

Programs

Formula

a(n) = a(n - 112) for n > 113. - Jeppe Stig Nielsen, Dec 14 2019

Extensions

More terms from Sascha Kurz, Mar 23 2002
Terms a(106) and beyond from Jeppe Stig Nielsen, Dec 14 2019

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

A046955 Numbers k such that sec(k) decreases monotonically to 1 (or cos(k) increases to 1).

Original entry on oeis.org

1, 6, 19, 25, 44, 333, 710, 103993, 312689, 1980127, 2292816, 4272943, 10838702, 80143857, 411557987, 2137933792, 2549491779, 12335900908, 14885392687, 42106686282, 1783366216531, 8958937768937, 279510437053578, 288469374822515, 567979811876093
Offset: 1

Views

Author

Keywords

Comments

Also numerators of convergents to 2*Pi. - Vladeta Jovovic, Nov 09 2004

Examples

			cos(411557987) = 0.999999999999999996782535835854909099962858791940...
		

Crossrefs

Cf. A046947.
Cf. A242859 (denominators).

Programs

  • Mathematica
    a = 0; Do[ If[ Cos[n] > a, Print[n]; a = Cos[n]], {n, 1, 421000000}] (* Robert G. Wilson v, Dec 29 2003 *)
    b = 10; Do[ If[ Abs[ Mod[n + Pi/2, 2Pi] - Pi/2] < b, Print[n]; b = Abs[ Mod[n + Pi/2, 2Pi] - Pi/2]], {n, 1, 421000000}] (* Robert G. Wilson v, Dec 29 2003 *)
    Join[{1}, Numerator[Convergents[2Pi, 33]]] (* Stéphane Mottelet, Oct 12 2011 *)

Extensions

More terms from Michel ten Voorde
One more term from Vladeta Jovovic, Apr 03 2000
8 more terms from Vladeta Jovovic, Nov 09 2004
More terms from Stéphane Mottelet, Oct 12 2011
Definition corrected by N. J. A. Sloane, Mar 16 2018 following a suggestion from Allan C. Wechsler.

A242859 Denominators of convergents to 2*Pi.

Original entry on oeis.org

1, 3, 4, 7, 53, 113, 16551, 49766, 315147, 364913, 680060, 1725033, 12755291, 65501488, 340262731, 405764219, 1963319607, 2369083826, 6701487259, 283831548704, 1425859230779, 44485467702853, 45911326933632, 90396794636485, 136308121570117, 908245524057187
Offset: 1

Views

Author

Hans Havermann, May 24 2014

Keywords

Crossrefs

Cf. A046955 (numerators to 2*Pi, assuming offset 0), A002486 (denominators to Pi, assuming offset -1), A002485 (numerators to Pi, assuming offset -1), A046947 (numerators to Pi, assuming offset 0).

Programs

  • Mathematica
    Denominator[Convergents[2 Pi, 50]] (* Wesley Ivan Hurt, May 24 2014 *)

A331008 Numbers m such that (11*prime(m)) mod Pi > (11*prime(m+1)) mod Pi.

Original entry on oeis.org

71, 179, 274, 367, 452, 539, 623, 705, 786, 869, 943, 1024, 1106, 1183, 1262, 1335, 1405, 1483, 1562, 1636, 1705, 1780, 1860, 1929, 2000, 2074, 2146, 2214, 2286, 2355, 2431, 2502, 2576, 2645, 2717, 2781, 2849, 2918, 2990, 3059, 3130, 3201, 3262, 3330, 3399, 3462, 3538
Offset: 1

Views

Author

Andres Cicuttin, Jan 06 2020

Keywords

Comments

The average distance between consecutive terms decreases very slowly, and this pattern can be observed in this sequence up to values of m as high as 2^42 where the average distance is about four times lower than at the beginning of the sequence.
It seems that sequences of the form b(n) = (k*prime(n)) mod x exhibit a quasi-periodic sawtooth-like trend with slightly decreasing period when x is a positive irrational and k is the numerator (or a multiple of it) of a convergent to x. The Mathematica program in Links allows an easy experimentation on this feature and similar patterns obtained with other irrational constants x, and integer factors k.

Examples

			a(1) is 71 because (11*prime(71)) mod Pi = ~3.133072, a larger value than (11*prime(72)) mod Pi = ~0.018034. For any other primes p and q such that p < q < prime(71) we can see that (11*prime(p)) mod Pi < (11*prime(q)) mod Pi.
a(2) is 179 because (11*prime(179)) mod Pi = ~3.133735, a larger value than (11*prime(180)) mod Pi = ~0.018697. For any other primes p and q such that prime(71) < p < q < prime(179) we can see that (11*prime(p)) mod Pi < (11*prime(q)) mod Pi.
		

Crossrefs

Programs

  • Maple
    q:= n-> (f-> is(f(11*ithprime(n))>f(11*ithprime(n+1))))(k-> k-floor(k/Pi)*Pi):
    select(q, [$1..4000])[];  # Alois P. Heinz, Jun 12 2023
  • Mathematica
    Flatten@Position[Differences[N[Mod[11*Prime[Range[2^13]], Pi], 24]],
       x_ /; x < 0]
    Select[Range[3700],Mod[11Prime[#],Pi]>Mod[11Prime[#+1],Pi]&] (* Harvey P. Dale, Jan 30 2025 *)
  • PARI
    isok(k) = 11*prime(k) % Pi > 11*prime(k+1) % Pi; \\ Michel Marcus, Jun 12 2023

A079037 a(0)=1; a(n) is the smallest integer > a(n-1) such that sin(a(n)) is closer to an integer (here 0 or -1) than sin(a(n-1)).

Original entry on oeis.org

1, 3, 5, 11, 344, 1054, 1764, 2474, 3184, 3894, 4604, 5314, 6024, 6734, 7444, 8154, 8864, 9574, 10284, 10994, 11704, 12414, 13124, 13834, 14544, 15254, 15964, 16674, 17384, 18094, 18804, 19514, 20224, 20934, 21644, 22354, 23064, 23774, 24484
Offset: 0

Views

Author

Benoit Cloitre, Feb 01 2003

Keywords

Examples

			sin(1)=0.84147..., sin(2)=0.90929..., sin(3)=0.14112..., hence a(2)=3
		

Crossrefs

Cf. A046947 ( for abs(sin(x)) ).

Programs

  • PARI
    x=1; y=1; a(n)=if(n<0,0,b=y+1; while(frac(sin(b))>frac(sin(x)),b++); x=b; y=b; b)
Showing 1-10 of 17 results. Next