login
A388041
a(n) = n! * ((n-2) * 2^(n-1) + 1).
0
0, 0, 2, 30, 408, 5880, 92880, 1617840, 31006080, 650643840, 14867193600, 367913145600, 9810431769600, 280570876185600, 8570061916416000, 278525486663424000, 9598392629489664000, 349655325002919936000, 13426757224088592384000, 542105186071838957568000, 22959746338034464358400000
OFFSET
0,3
COMMENTS
Number of ways to sit n people on linearly ordered benches and choose 2 people from any bench.
If the benches are not linearly ordered the sequence is A386961.
If only 1 bench is used the sequence is A001804.
FORMULA
a(n) = n! * A000337(n-1), n > 0.
E.g.f.: x^2 / ((1-x) * (1-2*x)^2).
EXAMPLE
a(5)=5880 since the number of ways are (number of people in parentheses, configurations with linearly ordered benches):
1 bench (5): 120 configurations, 1200 ways;
2 benches (4,1): 240 configurations, 1440 ways;
2 benches (3,2): 240 configurations, 960 ways;
3 benches (3,1,1): 360 configurations, 1080 ways;
3 benches (2,2,1): 360 configurations, 720 ways;
4 benches (2,1,1,1): 480 configurations, 480 ways;
5 benches (1,1,1,1,1): 120 configurations, 0 ways, for a total of 5880 ways.
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Sep 13 2025
STATUS
approved