OFFSET
0,4
COMMENTS
Wang, Miska, & Mező call these 3-derangement numbers. a(n) counts the fixed point free permutations (derangements) on n + 3 elements such that the first 3 elements belong to distinct cycles. - Istvan Mezo, Apr 05 2017
REFERENCES
P. A. MacMahon, Combinatory Analysis, 2 vols., Chelsea, NY, 1960, see p. 108.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
C.-Y. Wang, P. Miska, I. Mező, The r-derangement numbers, Discrete Mathematics 340.7 (2017): 1681-1692.
FORMULA
G.f.: (2*x-1)*hypergeom([1,2],[],x/(1+x))/(3*(1+x)^2) - (5*x-1)*hypergeom([2,3],[],x/(1+x))/(3*(1+x)^3). - Mark van Hoeij, Nov 19 2011
E.g.f.: x^3*exp(-x)/(1-x)^4. - Istvan Mezo, Apr 05 2017
MATHEMATICA
Table[((n^3 - 4 n + 1) Subfactorial[n] + (-1)^(n + 1) (n - 1)^2)/ 6, {n, 0, 21}] (* Michael De Vlieger, Apr 05 2017 *)
PROG
(PARI) s(n) = if( n<1, 1, n * s(n-1) + (-1)^n);
a(n) = ((n^3 - 4*n + 1) * s(n) + (-1)^(n + 1) * (n - 1)^2)/6; \\ Indranil Ghosh, Apr 06 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 27 2005
STATUS
approved