%I #25 Jan 05 2021 21:38:25
%S 1,0,1,0,3,1,0,19,6,2,0,175,51,24,6,0,2101,580,300,120,24,0,31031,
%T 8265,4360,2160,720,120,0,543607,141246,74130,41160,17640,5040,720,0,
%U 11012415,2810437,1456224,861420,430080,161280,40320,5040
%N Number T(n,k) of endofunctions on [n] where the smallest cycle length equals k; triangle T(n,k), n>=0, 0<=k<=n, read by rows.
%C T(0,0) = 1 by convention.
%C 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
%H Alois P. Heinz, <a href="/A246049/b246049.txt">Rows n = 0..140, flattened</a>
%e Triangle T(n,k) begins:
%e 1;
%e 0, 1;
%e 0, 3, 1;
%e 0, 19, 6, 2;
%e 0, 175, 51, 24, 6;
%e 0, 2101, 580, 300, 120, 24;
%e 0, 31031, 8265, 4360, 2160, 720, 120;
%e 0, 543607, 141246, 74130, 41160, 17640, 5040, 720;
%e ...
%p with(combinat):
%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i>n, 0,
%p add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
%p b(n-i*j, i+1), j=0..n/i)))
%p end:
%p A:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j, k), j=0..n):
%p T:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), A(n, k) -A(n, k+1)):
%p seq(seq(T(n, k), k=0..n), n=0..12);
%t multinomial[n_, k_List] := n!/Times @@ (k!);
%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i>n, 0,
%t Sum[(i-1)!^j*multinomial[n, {n-i*j, Sequence @@ Table[i, {j}]}]/j!*
%t b[n-i*j, i+1], {j, 0, n/i}]]];
%t A[n_, k_] := Sum[Binomial[n-1, j-1]*n^(n-j)*b[j, k], {j, 0, n}];
%t T[n_, k_] := If[k == 0, If[n == 0, 1, 0], A[n, k] - A[n, k+1]];
%t Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, Jan 06 2015, after _Alois P. Heinz_ *)
%Y Columns k=0-10 give: A000007, A045531, A246189, A246190, A246191, A246192, A246193, A246194, A246195, A246196, A246197.
%Y T(2n,n) gives A246050.
%Y Row sums give A000312.
%Y Main diagonal gives A000142(n-1) for n>0.
%Y Cf. A241981, A243098.
%K nonn,tabl
%O 0,5
%A _Alois P. Heinz_, Aug 11 2014