OFFSET
2,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..448
Wikipedia, Permutation
FORMULA
Recursion: see Maple program.
E.g.f.: x*(x*(x-2)+2*(x-1)^2*log(1-x))/(4*(x-1)^3).
a(n) ~ n! * n^2 / 8. - Vaclav Kotesovec, Apr 20 2017
EXAMPLE
a(3) = 12 because the sum of the entries in the second cycles of all permutations of [3] ((123), (132), (12)(3), (13)(2), (1)(23), (1)(2)(3)) is 0+0+3+2+5+2 = 12.
MAPLE
a:= proc(n) option remember; `if`(n<3, (n-1)*n,
((2*n^3-7*n^2+11*n-8)*n*a(n-1)-(n-1)*(n-2)
*(n^2-n+2)*n*a(n-2))/((n^2-3*n+4)*(n-1)))
end:
seq(a(n), n=2..25);
MATHEMATICA
a[2] = 2; a[3] = 12; a[n_] := a[n] = ((2n^3 - 7n^2 + 11n - 8) n a[n-1] - (n-1)(n-2)(n^2 - n + 2) n a[n-2])/((n^2 - 3n + 4)(n-1));
Table[a[n], {n, 2, 25}] (* Jean-François Alcover, Jun 01 2018, from Maple *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Apr 19 2017
STATUS
approved