OFFSET
1,2
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,6,0,0,-1).
FORMULA
If n mod 3 = 2: a(n) = 3*a(n-1) - a(n-2), otherwise: a(n) = a(n-1) + a(n-2), for n>2 with a(1)=1, a(2)=3.
a(3n-2) = 1/2*S(2n-1), a(3n-1) = 1/2*S(2n), a(3n) = w/2*D(2n), for n>0 with w = sqrt(2) and S(n) = (1+w)^n + (1-w)^n and D(n) = (1+w)^n - (1-w)^n.
From Colin Barker, Jan 10 2020: (Start)
G.f.: x*(1 + x)*(1 + 2*x + 2*x^2 - x^3) / (1 - 6*x^3 + x^6).
a(n) = 6*a(n-3) - a(n-6) for n>6.
(End)
EXAMPLE
The principal convergents are 1/1, 3/2, 7/5, 17/12, ... and 1,3,7,17,... the corresponding numerators, see A001333. Intermediate convergents: (2/1), 4/3, (10/7), 24/17, ... (best approximations without brackets). Numerators: 4,24,... (subsequence of A143607). All these numerators sorted: 1,3,4,7,17,24,...
PROG
(PARI) Vec(x*(1 + x)*(1 + 2*x + 2*x^2 - x^3) / (1 - 6*x^3 + x^6) + O(x^40)) \\ Colin Barker, Jan 10 2020
CROSSREFS
KEYWORD
nonn,frac,easy
AUTHOR
Gerhard Kirchner, Jan 10 2020
STATUS
approved