login
a(n) = n!*tribonacci(n+2).
5

%I #18 Aug 31 2023 02:58:46

%S 1,1,4,24,168,1560,17280,221760,3265920,54069120,994291200,

%T 20118067200,444034483200,10617070464000,273391121203200,

%U 7542665754624000,221969877921792000,6940528784437248000,229781192298577920000,8030036368187817984000,295390797322766745600000

%N a(n) = n!*tribonacci(n+2).

%C a(n) is the number of ways to partition [n] into blocks of size at most 3, order the blocks, and order the elements within each block.

%F E.g.f.: 1/(1-x-x^2-x^3).

%F a(n) = A000142(n) * A000073(n+2).

%e a(5) = 1560 since the number of ways to partition [5] into blocks of size at most 3, order the blocks, and order the elements within each block are the following:

%e 1) 1,2,3,4,5: 120 ordered blocks; 120 ways;

%e 2) 12,3,4,5: 240 ordered blocks; 480 ways;

%e 3) 12,34,5: 90 ordered blocks; 360 ways;

%e 4) 123,45: 20 ordered blocks; 240 ways;

%e 5) 123,4,5: 60 ordered blocks; 360 ways.

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

%p a(n-i)*binomial(n, i)*i!, i=1..min(n, 3)))

%p end:

%p seq(a(n), n=0..20); # _Alois P. Heinz_, Jul 18 2023

%t With[{m = 21}, Range[0, m - 1]! * LinearRecurrence[{1, 1, 1}, {1, 1, 2}, m]] (* _Amiram Eldar_, Jul 28 2023 *)

%Y Cf. A000073, A000142, A002866, A005442, A189886.

%K nonn

%O 0,3

%A _Enrique Navarrete_, Jul 18 2023