A131622 Number of cycles in all permutations of n elements with distinct cycle lengths.
1, 1, 8, 22, 124, 948, 6138, 50832, 468144, 5165280, 54704880, 695854080, 9016051680, 130427750880, 1994479744320, 32575206343680, 555499414471680, 10284817657927680, 196642556903116800, 3994718386866278400, 84989047758544742400, 1895851170953432985600
Offset: 1
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..450
Programs
-
Maple
A131622 := proc(n) local su,i ; su := add(x^i/(i+x^i),i=1..n+1) ; for i from 1 to n do su := taylor(su*(1+x^i/i),x=0,n+1) ; od: n!*coeftayl(su,x=0,n) ; end: seq(A131622(n),n=1..30) ; # R. J. Mathar, Oct 25 2007 # second Maple program: b:= proc(n, i) option remember; `if`(n=0, [1, 0], `if`(i<1, 0, `if`(i>n, 0, (p->[0, p[1]]+p)( b(n-i, i-1)*binomial(n, i)*(i-1)!))+b(n, i-1))) end: a:= n-> b(n$2)[2]: seq(a(n), n=1..30); # Alois P. Heinz, May 14 2016
-
Mathematica
b[n_, i_] := b[n, i] = If[n == 0, {1, 0}, If[i < 1, {0, 0}, If[i > n, {0, 0}, Function[p, {0, p[[1]]} + p][b[n-i, i-1] Binomial[n, i] (i-1)!]] + b[n, i-1]]]; a[n_] := b[n, n][[2]]; Array[a, 30] (* Jean-François Alcover, May 22 2020, after Alois P. Heinz *) nmax = 30; Rest[CoefficientList[Series[Sum[x^k/(k + x^k), {k, 1, nmax}] * Product[1 + x^k/k, {k, 1, nmax}], {x, 0, nmax}], x] * Range[0, nmax]!] (* Vaclav Kotesovec, May 22 2020 *)
Formula
E.g.f.: Sum(x^n/(n+x^n), n=1..inf) * Product(1+x^n/n, n=1..inf).
Extensions
More terms from R. J. Mathar, Oct 25 2007