OFFSET
1,2
COMMENTS
a(n) = Sum(k*A162971(n,k), k=1..n).
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..200
FORMULA
E.g.f.: (z*exp(-z) + (exp(-z)-1)*log(1-z)) / (1-z).
a(n) ~ n! * ((1-exp(-1))*(log(n) + gamma) + exp(-1)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 02 2013
Conjecture D-finite with recurrence a(n) +(-3*n+8)*a(n-1) +(n-3)*(3*n-14)*a(n-2) +(-n^3+19*n^2-98*n+156)*a(n-3) +(-4*n^3+56*n^2-258*n+395)*a(n-4) +(-6*n^3+84*n^2-395*n+624)*a(n-5) -(n-5)*(4*n^2-41*n+106)*a(n-6) -(n-5)*(n-6)^2*a(n-7)=0. - R. J. Mathar, Jul 26 2022
EXAMPLE
a(3) = 9 because in the 4 non-derangement permutations of {1,2,3,4}, namely (1)(2)(3), (1)(23), (12)(3), (13)(2), we have a total of 3 + 2 + 2 + 2 = 9 cycles.
MAPLE
g := (z*exp(-z)+(exp(-z)-1)*ln(1-z))/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 1 .. 22);
MATHEMATICA
Rest[CoefficientList[Series[(x*Exp[-x]+(Exp[-x]-1)*Log[1-x])/(1-x), {x, 0, 20}], x]* Range[0, 20]!] (* Vaclav Kotesovec, Oct 02 2013 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Emeric Deutsch, Jul 22 2009
EXTENSIONS
a(21)-a(22) from Vincenzo Librandi, Oct 04 2013
STATUS
approved