OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-9,4).
FORMULA
G.f.: (1 + 2*x - 15*x^2)/((1-x)^2*(1-4*x)).
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3).
E.g.f.: exp(x)*(exp(3*x) + 4*x). - Elmo R. Oliveira, Sep 10 2024
MATHEMATICA
Table[(4^n + 4 n), {n, 0, 30}] (* or *) CoefficientList[Series[(1 + 2 x - 15 x^2)/((1 - x)^2 (1 - 4 x)), {x, 0, 30}], x]
PROG
(Magma) [4^n + 4*n: n in [0..30]]; /* or */ I:=[1, 8, 24]; [n le 3 select I[n] else 6*Self(n-1)-9*Self(n-2)+4*Self(n-3): n in [1..30]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Mar 02 2013
STATUS
approved