A345341 Total number of cycles in all permutations of [n] having cycles of the form (c1, c2, ..., c_m) where c1 = min_{i>=1} c_i and c_j = min_{i>=j} c_i or c_j = max_{i>=j} c_i.
0, 1, 3, 11, 48, 238, 1318, 8054, 53728, 387836, 3007940, 24917668, 219375104, 2043792680, 20074003368, 207186660712, 2240632127232, 25324980662544, 298471543286448, 3660469596095280, 46627358889945344, 615855211031451104, 8421273619742748256
Offset: 0
Keywords
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..527
- Wikipedia, Permutation
Crossrefs
Cf. A344855.
Programs
-
Maple
b:= proc(n) option remember; `if`(n=0, [1, 0], add((p-> p+[0, p[1]])(b(n-j)*binomial(n-1, j-1)*ceil(2^(j-2))), j=1..n)) end: a:= n-> b(n)[2]: seq(a(n), n=0..23);
-
Mathematica
b[n_] := b[n] = If[n == 0, {1, 0}, Sum[Function[p, p + {0, p[[1]]}][b[n-j] Binomial[n-1, j-1] Ceiling[2^(j-2)]], {j, 1, n}]]; a[n_] := b[n][[2]]; Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Aug 25 2021, after Alois P. Heinz *)
Formula
a(n) = Sum_{k=1..n} k * A344855(n,k).