login
Number T(n,k) of endofunctions on [n] with exactly k cycles of length larger than 1; triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.
2

%I #42 Mar 24 2023 15:50:28

%S 1,1,3,1,16,11,125,128,3,1296,1734,95,16807,27409,2425,15,262144,

%T 499400,61054,945,4782969,10346328,1605534,42280,105,100000000,

%U 240722160,44981292,1706012,11025,2357947691,6222652233,1351343346,67291910,763875,945

%N Number T(n,k) of endofunctions on [n] with exactly k cycles of length larger than 1; triangle T(n,k), n>=0, 0<=k<=floor(n/2), read by rows.

%H Alois P. Heinz, <a href="/A350446/b350446.txt">Rows n = 0..200, flattened</a>

%F From _Mélika Tebni_, Mar 23 2023: (Start)

%F E.g.f. of column k: (W(-x)-log(1 + W(-x)))^k / (exp(W(-x))*k!), W(x) the Lambert W-function.

%F T(n,k) = Sum_{j=k..n} n^(n-j)*binomial(n-1,j-1)*A136394(j,k), for n > 0.

%F T(n,k) = Sum_{j=k..n} (n-j+1)^(n-j-1)*binomial(n,j)*A350452(j,k).

%F Sum_{k=0..n/2} (k+1)*T(n,k) = A190314(n), for n > 0.

%F Sum_{k=0..n/2} 2^k*T(n,k) = A217701(n). (End)

%e Triangle T(n,k) begins:

%e 1;

%e 1;

%e 3, 1;

%e 16, 11;

%e 125, 128, 3;

%e 1296, 1734, 95;

%e 16807, 27409, 2425, 15;

%e 262144, 499400, 61054, 945;

%e 4782969, 10346328, 1605534, 42280, 105;

%e 100000000, 240722160, 44981292, 1706012, 11025;

%e 2357947691, 6222652233, 1351343346, 67291910, 763875, 945;

%e ...

%p c:= proc(n) option remember; add(n!*n^(n-k-1)/(n-k)!, k=2..n) end:

%p t:= proc(n) option remember; n^(n-1) end:

%p b:= proc(n) option remember; expand(`if`(n=0, 1, add(

%p b(n-i)*binomial(n-1, i-1)*(c(i)*x+t(i)), i=1..n)))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n/2))(b(n)):

%p seq(T(n), n=0..12);

%p # second Maple program:

%p egf := k-> (LambertW(-x)-log(1+LambertW(-x)))^k/(exp(LambertW(-x))*k!):

%p A350446 := (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n):

%p seq(print(seq(A350446(n, k), k=0..n/2)), n=0..10); # _Mélika Tebni_, Mar 23 2023

%t c[n_] := c[n] = Sum[n!*n^(n - k - 1)/(n - k)!, {k, 2, n}];

%t t[n_] := t[n] = n^(n - 1);

%t b[n_] := b[n] = Expand[If[n == 0, 1, Sum[

%t b[n - i]*Binomial[n - 1, i - 1]*(c[i]*x + t[i]), {i, 1, n}]]];

%t T[n_] := With[{p = b[n]}, Table[Coefficient[p, x, i], {i, 0, n/2}]];

%t Table[T[n], {n, 0, 12}] // Flatten (* _Jean-François Alcover_, May 06 2022, after _Alois P. Heinz_ *)

%Y Column k=0 gives A000272(n+1).

%Y Row sums give A000312.

%Y T(2n,n) gives A001147.

%Y Cf. A055134, A060281, A349454, A350452.

%Y Cf. A136394, A190314, A217701.

%K nonn,tabf

%O 0,3

%A _Alois P. Heinz_, Dec 31 2021