OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,5,-6).
FORMULA
From Colin Barker, Oct 19 2012: (Start)
a(n) = (-4 + (-2)^n + 2*3^(n+1))/3 - [n=0].
a(n) = 2*a(n-1) + 5*a(n-2) - 6*a(n-3) for n>3.
G.f.: 2*x*(2-x)*(1+3*x)/((1-x)*(1+2*x)*(1-3*x)). (End)
E.g.f.: (1/3)*(exp(-2*x) - 3 - 4*exp(x) + 6*exp(3*x)). - G. C. Greubel, Dec 25 2022
MATHEMATICA
LinearRecurrence[{2, 5, -6}, {0, 4, 18, 50}, 51] (* Harvey P. Dale, Oct 18 2014 *)
PROG
(Magma) [0] cat [(-4 + (-2)^n + 2*3^(n+1))/3: n in [1..50]]; // G. C. Greubel, Dec 25 2022
(SageMath) [(-4 + (-2)^n + 2*3^(n+1))/3 -int(n==0) for n in range(51)] # G. C. Greubel, Dec 25 2022
CROSSREFS
KEYWORD
nonn,less
AUTHOR
Roger L. Bagula, Aug 10 2006
EXTENSIONS
Edited by G. C. Greubel, Dec 25 2022
Meaningful name using given formula from Joerg Arndt, Dec 26 2022
STATUS
approved