login
Number of endofunctions on [n] where the smallest cycle length equals 3.
2

%I #11 Dec 28 2020 09:52:41

%S 2,24,300,4360,74130,1456224,32562152,817596000,22785399450,

%T 697951656160,23306666102148,842567564800416,32781106696806650,

%U 1365579024023558400,60639189588419033040,2859165143013913590016,142651621238828972159538,7508140027468431374563200

%N Number of endofunctions on [n] where the smallest cycle length equals 3.

%H Alois P. Heinz, <a href="/A246190/b246190.txt">Table of n, a(n) for n = 3..200</a>

%F a(n) ~ (exp(-3/2) - exp(-11/6)) * n^n. - _Vaclav Kotesovec_, Aug 21 2014

%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 a:= n-> A(n, 3) -A(n, 4):

%p seq(a(n), n=3..25);

%t multinomial[n_, k_List] := n!/Times @@ (k!);

%t b[n_, i_] := b[n, i] = If[n==0, 1, If[i>n, 0, Sum[(i - 1)!^j multinomial[n, Join[{n - i*j}, Table[i, {j}]]]/j! 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 a[n_] := A[n, 3] - A[n, 4];

%t a /@ Range[3, 25] (* _Jean-François Alcover_, Dec 28 2020, after _Alois P. Heinz_ *)

%Y Column k=3 of A246049.

%K nonn

%O 3,1

%A _Alois P. Heinz_, Aug 18 2014