OFFSET
0,2
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
G.f.: 2*x*(-5 + x)/((1 + x)*(1 - 3*x + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3).
a(n) = -2*A192914(n+1).
a(n) = (2^(1-n)*(3*(-1)^n*2^(1+n)+(3-sqrt(5))^n*(-3+2*sqrt(5))-(3+sqrt(5))^n*(3+2*sqrt(5))))/5. - Colin Barker, Sep 30 2016
EXAMPLE
Let p(n,x) be the minimal polynomial of the number given by the n-th continued fraction:
[tau,1,1,1,1,...] = sqrt(5) has p(0,x) = -5 + x^2, so a(0) = 0;
[1,tau,1,1,1,...] = (5 + sqrt(5))/5 has p(1,x) = 4 - 10*x + 5*x^2, so a(1) = -10;
[1,1,tau,1,1,...] = (9 - sqrt(5))/4 has p(2,x) = 19 - 18*x + 4*x^2, so a(2) = -18.
MATHEMATICA
PROG
(PARI) a(n) = round((2^(1-n)*(3*(-1)^n*2^(1+n)+(3-sqrt(5))^n*(-3+2*sqrt(5))-(3+sqrt(5))^n*(3+2*sqrt(5))))/5) \\ Colin Barker, Sep 30 2016
(PARI) concat(0, Vec(-2*x*(5-x)/((1+x)*(1-3*x+x^2)) + O(x^30))) \\ Colin Barker, Sep 30 2016
CROSSREFS
KEYWORD
sign,easy,changed
AUTHOR
Clark Kimberling, Jan 09 2016
STATUS
approved