A285489 Sum of entries in the second cycles of all permutations of [n].
2, 12, 76, 545, 4422, 40194, 405072, 4484808, 54121680, 707105520, 9944043840, 149769846720, 2405254884480, 41029304803200, 740857462732800, 14117363667993600, 283111532808652800, 5960312380873267200, 131434781395405824000, 3029635129259289600000
Offset: 2
Keywords
Examples
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.
Links
- Alois P. Heinz, Table of n, a(n) for n = 2..448
- Wikipedia, Permutation
Crossrefs
Column k=2 of A285439.
Programs
-
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 *)
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