OFFSET
0,1
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(0)=30, a(1)=42, a(2)=146, a(n) = 2*a(n-1)+2*a(n-2)-a(n-3). - Harvey P. Dale, Aug 21 2014
a(n) = (2^(1-n)*(25*(-2)^n+(25-11*sqrt(5))*(3-sqrt(5))^n+(3+sqrt(5))^n*(25+11*sqrt(5))))/5. - Colin Barker, Oct 01 2016
MATHEMATICA
CoefficientList[Series[2(x^2-9x+15)/(x^3-2x^2-2x+1), {x, 0, 30}], x] (* or *) LinearRecurrence[{2, 2, -1}, {30, 42, 146}, 30] (* Harvey P. Dale, Aug 21 2014 *)
PROG
(PARI) a(n) = round((2^(1-n)*(25*(-2)^n+(25-11*sqrt(5))*(3-sqrt(5))^n+(3+sqrt(5))^n*(25+11*sqrt(5))))/5) \\ Colin Barker, Oct 01 2016
(PARI) Vec(2*(x^2-9*x+15)/((1+x)*(1-3*x+x^2)) + O(x^40)) \\ Colin Barker, Oct 01 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Creighton Dement, Jan 08 2005
STATUS
approved