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.: (1 + 3 x - x^2)/(1 - 2 x - 2 x^2 + x^3).
a(n) = (2^(-n)*(9*(-2)^n+2*(3-sqrt(5))^n*(-11+5*sqrt(5))-2*(3+sqrt(5))^n*(11+5*sqrt(5))))/5. - Colin Barker, Oct 01 2016
EXAMPLE
Let p(n,x) be the minimal polynomial of the number given by the n-th continued fraction:
[2,2,1,1,1,...] = (7-sqrt(5))/2 has p(0,x) = 11 - 7 x + x^2, so a(0) = -7;
[2,1,2,1,1,1,...] = (25+sqrt(5))/10 has p(1,x) = 31 - 25 x + 5 x^2, so a(1) = -25;
[2,1,1,2,1,...] = (59-sqrt(5))/22 has p(2,x) = 79 - 59 x + 11 x^2, so a(2) = -59.
MATHEMATICA
PROG
(PARI) a(n) = round((2^(-n)*(9*(-2)^n+2*(3-sqrt(5))^n*(-11+5*sqrt(5))-2*(3+sqrt(5))^n*(11+5*sqrt(5))))/5) \\ Colin Barker, Oct 01 2016
(PARI) Vec(-(7+11*x-5*x^2)/((1+x)*(1-3*x+x^2)) + O(x^40)) \\ Colin Barker, Oct 01 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Clark Kimberling, Jan 09 2016
STATUS
approved