OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..740
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
From Elmo R. Oliveira, Sep 08 2025: (Start)
G.f.: (3*x^3 - 12*x^2 + 5*x + 1)/(-1+x)^4.
E.g.f.: (-x^3 + x^2 + 16*x + 2)*exp(x)/2.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)
MATHEMATICA
Table[-(1/2)(n+2)(n^2-6n-1), {n, 0, 40}] (* or *) LinearRecurrence[{4, -6, 4, -1}, {1, 9, 18, 25}, 40] (* Harvey P. Dale, Sep 08 2018 *)
PROG
(Magma) [-1/2*(n+2)*(n^2-6*n-1): n in [0..40]]; // Vincenzo Librandi, Apr 27 2011
(PARI) a(n)=-(n+2)*(n^2-6*n-1)/2 \\ Charles R Greathouse IV, Oct 18 2022
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved
