OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..3000
Index entries for linear recurrences with constant coefficients, signature (5, -8, 4).
FORMULA
G.f.: (-9*x^2 + 3*x + 1)/((1-x)*(1-2*x)^2).
a(n) = 5*a(n-1) - 8*a(n-2) + 4*a(n-3). - Harvey P. Dale, Jul 07 2011
a(n) = 2^(n-1)*(n+12) - 5. - Vincenzo Librandi, Sep 28 2011
MATHEMATICA
LinearRecurrence[{5, -8, 4}, {1, 8, 23}, 30] (* or *) CoefficientList[ Series[ (-9x^2+3x+1)/((1-x)(1-2x)^2), {x, 0, 30}], x] (* Harvey P. Dale, Jul 07 2011 *)
PROG
(Magma) [2^(n-1)*(n+12)-5: n in [0..30]]; // Vincenzo Librandi, Sep 28 2011
(PARI) Vec((-9*x^2+3*x+1)/((1-x)*(1-2*x)^2) + O(x^40)) \\ Andrew Howroyd, Feb 15 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved