OFFSET
0,2
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (5, -8, 3, 3, -2)
FORMULA
From Andrew Howroyd, Aug 09 2018: (Start)
a(n) = 5*a(n-1) - 8*a(n-2) + 3*a(n-3) + 3*a(n-4) - 2*a(n-5).
G.f.: (1 - 3*x + 3*x^2 - 2*x^3 + 2*x^4)/((1 - x)^2*(1 - 2*x)*(1 - x - x^2)).
(End)
EXAMPLE
a(4) = 21 = sum of row 4 terms of A131402: (1 + 6 + 7 + 6 + 1).
MATHEMATICA
LinearRecurrence[{5, -8, 3, 3, -2}, {1, 2, 5, 10, 21}, 40] (* Harvey P. Dale, Nov 22 2021 *)
PROG
(PARI) Vec((1 - 3*x + 3*x^2 - 2*x^3 + 2*x^4)/((1 - x)^2*(1 - 2*x)*(1 - x - x^2)) + O(x^40)) \\ Andrew Howroyd, Aug 09 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Jul 07 2007
EXTENSIONS
Terms a(10) and beyond from Andrew Howroyd, Aug 09 2018
STATUS
approved