OFFSET
0,5
COMMENTS
T(0,0) = 1 by convention.
In general, number of endofunctions on [n] where the smallest cycle length equals k is asymptotic to (exp(-H(k-1)) - exp(-H(k))) * n^n, where H(k) is the harmonic number A001008/A002805, k>=1. - Vaclav Kotesovec, Aug 21 2014
LINKS
Alois P. Heinz, Rows n = 0..140, flattened
EXAMPLE
Triangle T(n,k) begins:
1;
0, 1;
0, 3, 1;
0, 19, 6, 2;
0, 175, 51, 24, 6;
0, 2101, 580, 300, 120, 24;
0, 31031, 8265, 4360, 2160, 720, 120;
0, 543607, 141246, 74130, 41160, 17640, 5040, 720;
...
MAPLE
with(combinat):
b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>n, 0,
add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
b(n-i*j, i+1), j=0..n/i)))
end:
A:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j, k), j=0..n):
T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), A(n, k) -A(n, k+1)):
seq(seq(T(n, k), k=0..n), n=0..12);
MATHEMATICA
multinomial[n_, k_List] := n!/Times @@ (k!);
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i>n, 0,
Sum[(i-1)!^j*multinomial[n, {n-i*j, Sequence @@ Table[i, {j}]}]/j!*
b[n-i*j, i+1], {j, 0, n/i}]]];
A[n_, k_] := Sum[Binomial[n-1, j-1]*n^(n-j)*b[j, k], {j, 0, n}];
T[n_, k_] := If[k == 0, If[n == 0, 1, 0], A[n, k] - A[n, k+1]];
Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Jan 06 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Aug 11 2014
STATUS
approved