OFFSET
4,1
LINKS
Robert Israel, Table of n, a(n) for n = 4..448
FORMULA
a(n) = (n - 4)*(n!/8) + (n*(n - 1)/2 - 3)*(n!/12) = (n^2 + 2 n - 18)*(n!/24).
E.g.f.: x^4*(3*x^2+x-6)/(24*(x-1)^3). - Robert Israel, Jul 19 2017
MAPLE
seq((n^2 + 2 *n - 18)* n!/24, n=6..30); # Robert Israel, Jul 19 2017
MATHEMATICA
Table[(n - 4) (n!/8) + (n (n - 1)/2 - 3) (n!/12), {n, 4, 22}] (* Michael De Vlieger, Jul 18 2017 *)
PROG
(PARI) a(n) = (n - 4)*(n!/8) + (n*(n - 1)/2 - 3)*(n!/12); \\ Michel Marcus, Jul 18 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Eugene Y. Q. Shen, Jul 17 2017
STATUS
approved