login
A369810
Number of ways to color n+1 identical balls using n distinct colors (each color is used) and place them in n numbered cells so that each cell contains at least one ball.
0
1, 8, 63, 528, 4800, 47520, 511560, 5967360, 75116160, 1016064000, 14709340800, 227046758400, 3723758438400, 64686292070400, 1186714488960000, 22931377717248000, 465594843377664000, 9910874496466944000, 220725034691825664000, 5133423237252710400000
OFFSET
1,2
FORMULA
a(n) = n!*n*(n^2+n+2)/4.
a(n) = n*A284816(n).
a(n) = n^2*A006595(n-1).
E.g.f.: x*(2 + x^2)/(2*(1 - x)^4). - Stefano Spezia, Feb 05 2024
EXAMPLE
For n=3 one of the colors c (3 choices) is used twice and one of the cells k (3 choices) gets two balls. If the cell k does not contain a c-colored ball, then all other cells do (1 variant). If the cell k contains a c-colored ball, after its removal there are 3!=6 variants for placing the remaining 3 different balls in the 3 cells. In total there are 3*3*(1+6)=63 variants.
MATHEMATICA
Table[n!n(n^2+n+2)/4, {n, 20}] (* James C. McMahon, Feb 02 2024 *)
CROSSREFS
Sequence in context: A242631 A001090 A243782 * A105219 A060071 A037205
KEYWORD
nonn
AUTHOR
Ivaylo Kortezov, Feb 02 2024
STATUS
approved