OFFSET
0,2
COMMENTS
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,1,-2,-1).
FORMULA
G.f.: x*(3-2*x-2*x^2) / (1-x-x^2)^2.
From Colin Barker, Apr 14 2016: (Start)
a(n) = (2^(-1-n)*(-24*sqrt(5)*((1-sqrt(5))^n-(1+sqrt(5))^n)+5*((1-sqrt(5))^(1+n)+(1+sqrt(5))^(1+n))*n))/25.
a(n) = 2*a(n-1)+a(n-2)-2*a(n-3)-a(n-4) for n>3. (End)
E.g.f.: (1/25)*(sqrt(5)*(5*x + 24)*sinh((sqrt(5)*x)/2) + 15*x*cosh((sqrt(5)*x)/2))*exp(x/2). - Ilya Gutkovskiy, Apr 14 2016
MAPLE
MATHEMATICA
LinearRecurrence[{2, 1, -2, -1}, {0, 3, 4, 9}, 40] (* Harvey P. Dale, May 05 2020 *)
PROG
(PARI) concat(0, Vec(x*(3-2*x-2*x^2)/(1-x-x^2)^2 + O(x^50))) \\ Colin Barker, Apr 14 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. J. Mathar, Apr 14 2016
STATUS
approved