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

A002945 Continued fraction for cube root of 2.

Original entry on oeis.org

1, 3, 1, 5, 1, 1, 4, 1, 1, 8, 1, 14, 1, 10, 2, 1, 4, 12, 2, 3, 2, 1, 3, 4, 1, 1, 2, 14, 3, 12, 1, 15, 3, 1, 4, 534, 1, 1, 5, 1, 1, 121, 1, 2, 2, 4, 10, 3, 2, 2, 41, 1, 1, 1, 3, 7, 2, 2, 9, 4, 1, 3, 7, 6, 1, 1, 2, 2, 9, 3, 1, 1, 69, 4, 4, 5, 12, 1, 1, 5, 15, 1, 4
Offset: 0

Views

Author

Keywords

Examples

			2^(1/3) = 1.25992104989487316... = 1 + 1/(3 + 1/(1 + 1/(5 + 1/(1 + ...)))).
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002946, A002947, A002948, A002949, A002580 (decimal expansion).
Cf. A002351, A002352 (convergents).

Programs

  • Magma
    ContinuedFraction(2^(1/3)); // Vincenzo Librandi, Oct 08 2017
  • Maple
    N:= 100: # to get a(1) to a(N)
    a[1] := 1: p[1] := 1: q[1] := 0: p[2] := 1: q[2] := 1:
    for n from 2 to N do
      a[n] := floor((-1)^(n+1)*3*p[n]^2/(q[n]*(p[n]^3-2*q[n]^3)) - q[n-1]/q[n]);
      p[n+1] := a[n]*p[n] + p[n-1];
      q[n+1] := a[n]*q[n] + q[n-1];
    od:
    seq(a[i],i=1..N); # Robert Israel, Jul 30 2014
  • Mathematica
    ContinuedFraction[Power[2, (3)^-1],70] (* Harvey P. Dale, Sep 29 2011 *)
  • PARI
    allocatemem(932245000); default(realprecision, 21000); x=contfrac(2^(1/3)); for (n=1, 20000, write("b002945.txt", n-1, " ", x[n])); \\ Harry J. Smith, May 08 2009
    

Formula

From Robert Israel, Jul 30 2014: (Start)
Bombieri/van der Poorten give a complicated formula:
a(n) = floor((-1)^(n+1)*3*p(n)^2/(q(n)*(p(n)^3-2*q(n)^3)) - q(n-1)/q(n)),
p(n+1) = a(n)*p(n) + p(n-1),
q(n+1) = a(n)*q(n) + q(n-1),
with a(1) = 1, p(1) = 1, q(1) = 0, p(2) = 1, q(2) = 1. (End)

Extensions

BCMATH link from Keith R Matthews (keithmatt(AT)gmail.com), Jun 04 2006
Offset changed by Andrew Howroyd, Jul 04 2024

A002352 Numerators of convergents to cube root of 2.

Original entry on oeis.org

1, 4, 5, 29, 34, 63, 286, 349, 635, 5429, 6064, 90325, 96389, 1054215, 2204819, 3259034, 15240955, 186150494, 387541943, 1348776323, 3085094589, 4433870912, 16386707325, 69980700212, 86367407537, 156348107749, 399063623035, 5743238830239, 17628780113752
Offset: 0

Views

Author

Keywords

References

  • D. H. Lehmer, Guide to Tables in the Theory of Numbers. Bulletin No. 105, National Research Council, Washington, DC, 1941, p. 67.
  • P. Seeling, Verwandlung der irrationalen Groesse ... in einen Kettenbruch, Archiv. Math. Phys., 46 (1866), 80-120.
  • 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).

Crossrefs

Cf. A002351 (denominators), A002945.

Programs

  • Maple
    Digits := 60: E := 2^(1/3); convert(evalf(E),confrac,50,'cvgts'): cvgts;
    # Alternate:
    N:= 100: # to get a(1) to a(N)
    c[0] := 1: a[0] := 1: q[0] := 0: a[1] := 1: q[1] := 1:
    for n from 1 to N do
      c[n] := floor((-1)^n*3*a[n]^2/(q[n]*(a[n]^3-2*q[n]^3)) - q[n-1]/q[n]);
      a[n+1] := c[n]*a[n] + a[n-1];
      q[n+1] := c[n]*q[n] + q[n-1];
    od: seq(a[i], i=1..N); # Robert Israel, Oct 08 2017
  • Mathematica
    Convergents[CubeRoot[2],30]//Numerator (* Harvey P. Dale, May 30 2023 *)

Formula

From Robert Israel, Oct 08 2017: (Start)
c(n) = floor((-1)^n*3*a(n)^2/(q(n)*(a(n)^3-2*q(n)^3)) - q(n-1)/q(n)),
a(n+1) = c(n)*a(n) + a(n-1),
q(n+1) = c(n)*q(n) + q(n-1), with a(0) = 1, c(0) = 1, q(0) = 0, a(1) = 1, q(1) = 1. (End)

Extensions

Offset changed by Andrew Howroyd, Jul 04 2024

A138374 Count of post-period decimal digits up to which the rounded n-th convergent to 2^(1/3) agrees with the exact value.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 6, 6, 8, 6, 10, 10, 12, 13, 15, 16, 17, 16, 18, 19, 20, 21, 21, 22, 23, 25, 27, 28, 29, 30, 31, 32, 35, 38, 39, 40, 39, 41, 42, 45, 46, 46, 47, 49, 51, 52, 52, 54, 56, 56, 57, 58, 58, 60, 61, 62, 63, 65, 64, 66, 68, 69, 69, 70, 70, 72, 74, 74, 75, 77, 79, 81
Offset: 1

Views

Author

Artur Jasinski, Mar 17 2008

Keywords

Comments

This is a measure of the quality of the n-th convergent to the constant A002580 if the convergent and the exact value are compared rounded to an increasing number of digits. The sequence of rounded values of A002580 is 1, 1.3, 1.26, 1.260, 1.2599, 1.25992, 1.259921, 1.2599211 etc. The n-th convergents are taken from A002352 and A002351, each with associated rounded decimal expansions.
a(n) is the maximum number of post-period digits of the two expansions if compared at the same level of rounding.

Examples

			For n=5, the 5th convergent is 63/50 = 1.26000000.., with a sequence of rounded representations 1, 1.3, 1.26, 1.260, 1.2600, 1.26000, etc.
Rounded to 1, 2, or 3 post-period decimal digits, this is the same as the rounded version of the exact value, but disagrees if both are rounded to 4 decimal digits, where 1.2599 <> 1.2600.
So a(5) = 3 (digits), the maximum rounding level with agreement.
		

Crossrefs

Extensions

Definition and values replaced as defined via continued fractions - R. J. Mathar, Oct 01 2009

A341114 Denominators of continued fraction convergents to 2^(1/12).

Original entry on oeis.org

0, 1, 16, 17, 84, 185, 1379, 1564, 2943, 7450, 17843, 132351, 547247, 679598, 1906443, 2586041, 157068903, 159654944, 636033735, 795688679, 2227411093, 18614977423, 95302298208, 113917275631, 323136849470, 437054125101, 760190974571, 1197245099672
Offset: 0

Views

Author

Seiichi Manyama, Feb 05 2021

Keywords

Crossrefs

For numerators see A341113.

Programs

  • Mathematica
    Join[{0}, Denominator[Convergents[2^(1/12), 27]]] (* Amiram Eldar, Feb 05 2021 *)

Formula

a(0) = 0, a(1) = 1, a(n) = A103922(n-1) * a(n-1) + a(n-2) for n > 1.
Showing 1-4 of 4 results.