OFFSET
0,1
COMMENTS
See A265762 for a guide to related sequences.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
FORMULA
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3).
G.f.: (9 - 7 x - 39 x^2 + 14 x^3 - 4 x^4 + 2 x^5)/(1 - 2 x - 2 x^2 + x^3).
a(n) = 2^(-n)*(-43*(-2)^n+(3+sqrt(5))^n*(-1+3*sqrt(5))-(3-sqrt(5))^n*(1+3*sqrt(5)))/5 for n>2. - Colin Barker, Sep 29 2016
EXAMPLE
Let p(n,x) be the minimal polynomial of the number given by the n-th continued fraction:
[2/3,1,1,1,...] = (1+3*sqrt(5))/6 has p(0,x) = -11 - 3 x + 9 x^2, so a(0) = 9;
[1,2/3,1,1,...] = (19+9*sqrt(5))/22 has p(1,x) = -1 - 19 x + 11 x^2, so a(1) = 11;
[1,1,2/3,1,...] = (-17+9*sqrt(5))/2 has p(2,x) = -29 + 17 x + x^2, so a(2) = 1.
MATHEMATICA
PROG
(PARI) Vec((9-7*x-39*x^2+14*x^3-4*x^4+2*x^5)/((1+x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Sep 29 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jan 09 2016
STATUS
approved