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,1,-3,0,1).
FORMULA
a(n) = 2*a(n-1) + a(n-2) - 3*a(n-3) + a(n-5).
G.f.: (-2 + x)/((-1 + x)^2*(-1 + 2*x^2 + x^3)).
a(n) = (-9/4 + (3*(-1)^n)/4 + (2^(-n)*((1-t)^n*(-5+2*t) + (1+t)^n*(5+2*t)))/t + (-1-n)/2) where t=sqrt(5). - Colin Barker, Feb 09 2017
MATHEMATICA
f[x_] := (1 + x) (1 - x)^2; g[x] := 1 - x - x^2;
s = Normal[Series[(2 - x)/(f[x] g[x]), {x, 0, 60}]]
CoefficientList[s, x] (* A213046 *)
LinearRecurrence[{2, 1, -3, 0, 1}, {2, 3, 8, 13, 25}, 40] (* Harvey P. Dale, Aug 31 2023 *)
PROG
(Magma) /* By definition */ A008619:=func<n | 1+Floor(n/2)>; [&+[A008619(i)*Lucas(n-i): i in [0..n]]: n in [0..34]];
(PARI) a(n)=([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; 1, 0, -3, 1, 2]^n*[2; 3; 8; 13; 25])[1, 1] \\ Charles R Greathouse IV, Jan 29 2016
(PARI) Vec((-2 + x)/((-1 + x)^2*(-1 + 2*x^2 + x^3)) + O(x^60)) \\ Colin Barker, Feb 09 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 10 2012
STATUS
approved