login
Number of endofunctions on [n] whose cycle lengths are divisors of 6.
2

%I #5 Aug 28 2014 17:26:34

%S 1,1,4,27,250,2951,42552,726097,14318908,320511105,8029282096,

%T 222590246099,6765751467576,223748991426247,7998566722112800,

%U 307359039816710361,12634664945078752528,553260940314226017473,25711427896197877574208,1263904006537455579001675

%N Number of endofunctions on [n] whose cycle lengths are divisors of 6.

%H Alois P. Heinz, <a href="/A246526/b246526.txt">Table of n, a(n) for n = 0..350</a>

%F E.g.f.: exp(Sum_{d|6} (-LambertW(-x))^d/d).

%p with(numtheory):

%p egf:= k-> exp(add((-LambertW(-x))^d/d, d=divisors(k))):

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

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

%p # second Maple program:

%p with(combinat):

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

%p add(multinomial(n, n-i*j, i$j)/j!*b(n-i*j, i-1)*

%p (i-1)!^j, j=0..`if`(irem(6, i)=0, n/i, 0))))

%p end:

%p a:= n-> add(b(j, min(6, j))*n^(n-j)*binomial(n-1, j-1), j=0..n):

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

%Y Column k=6 of A246522.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Aug 28 2014