OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (5,-9,7,-2).
FORMULA
a(n) = 18*2^n - 2*n^2 - 10*n - 17.
From Colin Barker, Feb 20 2016: (Start)
a(n) = 5*a(n-1)-9*a(n-2)+7*a(n-3)-2*a(n-4) for n>3.
G.f.: (1+x)^2 / ((1-x)^3*(1-2*x)).
(End)
MATHEMATICA
LinearRecurrence[{5, -9, 7, -2}, {1, 7, 27, 79}, 50] (* Harvey P. Dale, Jul 08 2019 *)
PROG
(PARI) Vec((1+x)^2/((1-x)^3*(1-2*x)) + O(x^40)) \\ Colin Barker, Feb 20 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved