login
Number of endofunctions on [n] such that the number of elements that are mapped to i is either 0 or a divisor of i.
3

%I #18 Jul 20 2023 10:38:47

%S 1,1,3,13,115,851,13431,144516,2782571,47046307,1107742273,

%T 19263747713,657152726011,13657313316986,451605697223110,

%U 13377063396461138,531234399267707419,14563460779785318719,721703507708044677945,22141894282020163910406,1123287408943765640907425

%N Number of endofunctions on [n] such that the number of elements that are mapped to i is either 0 or a divisor of i.

%H Alois P. Heinz, <a href="/A364327/b364327.txt">Table of n, a(n) for n = 0..400</a>

%e a(0) = 1: ().

%e a(1) = 1: (1).

%e a(2) = 3: (22), (21), (12).

%e a(3) = 13: (333), (322), (232), (223), (321), (231), (213), (312), (132), (123), (221), (212), (122).

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

%p `if`(d>n, 0, b(n-d, i-1)*binomial(n, d)), d=numtheory[divisors](i))))

%p end:

%p a:= n-> b(n$2):

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

%Y Cf. A066843, A178682, A334370, A364328, A364344.

%K nonn

%O 0,3

%A _Alois P. Heinz_, Jul 18 2023