A200979 Number of ways to arrange n books on 4 consecutive bookshelves, leaving no shelf empty.
24, 480, 7200, 100800, 1411200, 20321280, 304819200, 4790016000, 79035264000, 1369944576000, 24932991283200, 475993469952000, 9519869399040000, 199184959733760000, 4353614119895040000, 99262401933606912000, 2357482045923164160000
Offset: 4
Keywords
Examples
a(5) = 480 since there are 480 ways to arrange books b1, b2, b3, b4, and b5 on shelves s1, s2, s3, and s4. In this case, one shelf will hold two books, and the other three shelves will hold one each. There are 4 ways to choose the shelf for two books; there are 20 ways to choose the two books and place them in order on the two-book shelf; there are 6 ways to arrange the other three books on the other three shelves. Hence a(5) = 4*20*6 = 480.
Programs
-
Maple
seq(n!*binomial(n-1,3)n=4..20);
Formula
a(n) = n!*binomial(n-1,3) = n!*(n-1)*(n-2)*(n-3)/6 for n >= 4.
E.g.f.: x^4/(1-x)^4.
a(n) = A156992(n,4).
Comments