OFFSET
1,1
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
Index entries for linear recurrences with constant coefficients, signature (6,-14,16,-9,2).
FORMULA
a(n) = 16*2^n - (2*n^3 + 9*n^2 + 73*n + 96)/6.
G.f.: x*(2 + 3*x - 9*x^2 + 6*x^3)/((1 - 2*x)*(1 - x)^4).
a(n) = A166761(n)/2.
MATHEMATICA
LinearRecurrence[{6, -14, 16, -9, 2}, {2, 15, 53, 146, 356}, 30] (* Paolo Xausa, Mar 02 2025 *)
PROG
(PARI) a(n) = {16*2^n - (2*n^3 + 9*n^2 + 73*n + 96)/6}
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Andrew Howroyd, Dec 11 2024
STATUS
approved
