OFFSET
1,2
REFERENCES
Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Clark Kimberling, Best lower and upper approximates to irrational numbers, Elemente der Mathematik, 52 (1997) 122-126.
Index entries for linear recurrences with constant coefficients, signature (0,0,4,0,0,-1).
FORMULA
From Colin Barker, Jul 28 2017: (Start)
G.f.: x*(1 + x)*(1 + x + 2*x^2 - x^3) / (1 - 4*x^3 + x^6).
a(n) = 4*a(n-3) - a(n-6) for n>6.
(End)
EXAMPLE
The first few principal and intermediate convergents to 3^(1/2) are 1/1, 2/1, 3/2, 5/3, 7/4, 12/7, ...
MATHEMATICA
LinearRecurrence[{0, 0, 4, 0, 0, -1}, {1, 2, 3, 5, 7, 12}, 40] (* Harvey P. Dale, May 12 2018 *)
PROG
(PARI) Vec(x*(1 + x)*(1 + x + 2*x^2 - x^3) / (1 - 4*x^3 + x^6) + O(x^60)) \\ Colin Barker, Jul 28 2017
CROSSREFS
KEYWORD
nonn,frac,easy
AUTHOR
Clark Kimberling, Aug 27 2008
STATUS
approved