A385081 Irregular triangle T(n,k) of refined derangement counts in the symmetric group S_(n+1), refined per cycle type.
1, 2, 3, 6, 20, 24, 15, 90, 40, 120, 210, 504, 420, 720, 105, 1260, 1120, 3360, 2688, 1260, 5040, 2520, 9072, 15120, 25920, 2240, 20160, 18144, 40320, 945, 18900, 25200, 75600, 120960, 56700, 226800, 50400, 172800, 151200, 72576, 362880
Offset: 1
Examples
The triangle begins: 1 2 3, 6 20, 24 15, 90, 40, 120 210, 504, 420, 720
Links
- Gregory Gerard Wojnar, Table of n, a(n) for n = 1..230
- Sean A. Irvine, Java program (github)
Programs
-
Mathematica
partitionMultiplicities[aPartn_]:=Table[Count[aPartn,m],{m,Total[aPartn]}] partitionBase[aPartn_]:=Sum[m*aPartn[[m]],{m,Length[aPartn]}] partitionFactorial[aPartn_]:=Product[m^aPartn[[m]],{m,partitionBase[aPartn]}] partitionParts[aPartn_]:=Sum[aPartn[[m]],{m,Length[aPartn]}] A385081[aPartn_]:=Multinomial@@aPartn*partitionBase[aPartn]!/(partitionFactorial[aPartn]*partitionParts[aPartn]!) Grid[Table[Map[A385081,Select[ReverseSort[Map[partitionMultiplicities,Partitions[n]],LexicographicOrder],#[[1]]==0&]],{n,2,12}]]
Formula
Given a partition P of N encoded as its multiplicities N-tuple (m_j: j=1..N) with K(P) = Sum_{j=1..N} m_j 'parts'. Define P! := Product_{j=1..N} j^m_j. Then the number of permutations in the symmetric group S_N of cycles type labelled by P is #P = multinomial(K(P); (m_j){j=1..N}) * N! / (P! * K(P)!), as stated in A181897 by Carlos Mafra.
Comments