OFFSET
0,3
COMMENTS
a(n) is the number of ways to partition [n] into blocks of size at most 2, order the blocks, order the elements within each block, and choose 2 elements from a block.
EXAMPLE
a(6)=14400 since the number of ways to partition [6] into blocks of size at most 2, order the blocks, order the elements within each block, and select 2 elements from a block are the following:
(i) 12,3,4,5,6: 3600 such orderings, 1 way to choose 2 elements (from the block with 2 elements), hence 3600 ways;
(ii) 12,34,5,6: 4320 such orderings, 2 ways to choose 2 elements (from one of the two blocks with 2 elements), hence 8640 ways.
(iii) 12,34,56: 720 such orderings, 3 ways to choose 2 elements (from one of the three blocks with 2 elements), hence 2160 ways.
MATHEMATICA
With[{m = 20}, Range[0, m]! * CoefficientList[Series[x^2/(1 - x - x^2)^2, {x, 0, m}], x]] (* Amiram Eldar, Sep 02 2023 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Sep 01 2023
STATUS
approved