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

A010124 Continued fraction for sqrt(19).

Original entry on oeis.org

4, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1
Offset: 0

Views

Author

Keywords

Examples

			4.358898943540673552236981983... = 4 + 1/(2 + 1/(1 + 1/(3 + 1/(1 + ...)))). - _Harry J. Smith_, Jun 03 2009
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A041028/A041029 (convergents).
Cf. A010475 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sqrt[19],300] (* Vladimir Joseph Stephan Orlovsky, Mar 05 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 17000); x=contfrac(sqrt(19)); for (n=0, 20000, write("b010124.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 03 2009

Formula

G.f.: (4 + 2*x + x^2 + 3*x^3 + x^4 + 2*x^5 + 4*x^6)/(1 - x^6). - Stefano Spezia, Jul 26 2025

A041029 Denominators of continued fraction convergents to sqrt(19).

Original entry on oeis.org

1, 2, 3, 11, 14, 39, 326, 691, 1017, 3742, 4759, 13260, 110839, 234938, 345777, 1272269, 1618046, 4508361, 37684934, 79878229, 117563163, 432567718, 550130881, 1532829480, 12812766721, 27158362922
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Denominator[FromContinuedFraction[ContinuedFraction[Sqrt[19],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 17 2011 *)
    CoefficientList[Series[- (x^10 - 2 x^9 + 3 x^8 - 11 x^7 + 14 x^6 - 39 x^5 - 14 x^4 - 11 x^3 - 3 x^2 - 2 x - 1)/(x^12 - 340 x^6 + 1), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 22 2013 *)

Formula

a(n) = 340*a(n-6)-a(n-12). G.f.: -(x^10- 2*x^9+ 3*x^8 -11*x^7 +14*x^6 -39*x^5 -14*x^4 -11*x^3 -3*x^2 -2*x -1)/(x^12-340*x^6+1). [Colin Barker, Jul 16 2012]

A341862 a(n) is the even term in the linear recurrence signature for numerators and denominators of continued fraction convergents to sqrt(n), or 0 if n is a square.

Original entry on oeis.org

0, 0, 2, 4, 0, 4, 10, 16, 6, 0, 6, 20, 14, 36, 30, 8, 0, 8, 34, 340, 18, 110, 394, 48, 10, 0, 10, 52, 254, 140, 22, 3040, 34, 46, 70, 12, 0, 12, 74, 50, 38, 64, 26, 6964, 398, 322, 48670, 96, 14, 0, 14, 100, 1298, 364, 970, 178, 30, 302, 198, 1060, 62, 59436
Offset: 0

Views

Author

Georg Fischer, Feb 22 2021

Keywords

Comments

The Everest et al. link states that "the continued fraction expansion of a quadratic irrational is eventually periodic, which implies that the numerators px and denominators qx of its convergents satisfy linear recurrence relations".
Let k be the period length minus one of the continued fraction of sqrt(n). Then the linear recurrence signatures with constant coefficients have the form (0, 0, ..., 0, a(n), 0, 0, ..., 0, (-1)^(n+1)), with k zeroes before and behind a(n).
a(n) is twice the numerator of the convergent to sqrt(n) with index k (starting with 0).
These properties result from the mirrored structure of the period of such continued fractions.
The sequence has remarkably many terms in common with A180495 and with 2*A033313.

Examples

			The numerators for sqrt(13) begin with 3, 4, 7, 11, 18, 119, ... (A041018) and have the signature (0,0,0,0,36,0,0,0,0,1). The continued fraction has period [1,1,1,1,6], so k=4 and a(13) = 2*A041018(4) = 2*18 = 36. The signature ends with (-1)^4.
The numerators for sqrt(19) begin with 4, 9, 13, 48, 61, 170, 1421, ... (A041028) and have the signature (0,0,0,0,0,340,0,0,0,0,0,-1). The continued fraction has period [2,1,3,1,2,8], so k=5 and a(19) = 2*A041028(5) = 2*170 = 340. The signature ends with (-1)^5.
		

Crossrefs

Formula

a(n) = 2*A006702(n) if n is not square, otherwise 0.
Showing 1-3 of 3 results.