OFFSET
0,3
COMMENTS
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.
EXAMPLE
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:
1) 1,2,3,4,5: 120 ordered blocks; 120 ways;
2) 12,3,4,5: 240 ordered blocks; 480 ways;
3) 12,34,5: 90 ordered blocks; 360 ways;
4) 123,45: 20 ordered blocks; 240 ways;
5) 123,4,5: 60 ordered blocks; 360 ways.
MAPLE
a:= proc(n) option remember; `if`(n=0, 1, add(
a(n-i)*binomial(n, i)*i!, i=1..min(n, 3)))
end:
seq(a(n), n=0..20); # Alois P. Heinz, Jul 18 2023
MATHEMATICA
With[{m = 21}, Range[0, m - 1]! * LinearRecurrence[{1, 1, 1}, {1, 1, 2}, m]] (* Amiram Eldar, Jul 28 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Jul 18 2023
STATUS
approved