Artificial intelligent assistant

Set of permutations with no collectively fixed points My roommate posed the following problem to me the other day: > If you have M pens of the same brand, and each is a different color and is composed of N pieces of that same color, then how many ways can you reassemble all of the pens such that at least one pen is a solid color? I wrote up the problem with a better explanation here. I think it's probably easier to find the number of ways to reassemble the pens with NONE of them in a solid color and then subtract that from the total. I figured out that that's equivalent to asking, how can you choose $N-1$ permutations (not necessarily distinct) from $S_m$ such that there's no fixed point which is shared by all of them. So for $N=2$, it's a derangement problem. Do you know of a way to extend this for larger $N$? * * * Thanks, John (Jack) McKeown

The answer is this for m pens and n pieces per pen: $$ f(m,n) = \sum_{j=0}^{m} (-1)^{m-j}\binom{m}{j}(j!)^n$$ I got this equation from here: <

Bonus points for anyone who can explain this...possibly in terms of Möbius inversion?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 066c7edf7b5351ebc8db3b5c96fb5b18