Theorem 6.9 in A Walk Through Combinatorics Says let $ a_1,a_2,...a_n; a_i$ is non negative integer with the constraint $\sum_{i=1}^n i a_i = n$ Then the number of n-permutations with $a_i$ cycles of length i where i ∈ [n], is
$\frac{n!} {a_1!a_2!···a_n!·1^{a_1}2^{a_2} ···n^{a_n}}$
I'm scratching my head trying visualize this series.
I mean [1],[0,1],[2,0],[0,0,1],[1,1,0],[3,0,0] etc works and maybe that's the point? Just seems like a random constraint given the preceding text which is all about permutations and graph cycles.
I'm stuck on this part of the book because of the sudden move from numbers with cycles like 24513 to things like above with a bunch of zeros in them.
Anyone have any insight to this.  I'm in self study on this book and also if anyone knows like a self study group on this text that might help as well.
 A: This is too long for a comment but perhaps short of a full answer. But looking at the proof of Theorem 7.9, it may be useful to consider an explicit example.
Suppose we pick a random 9-permutation---say, $g=(14732)(96)(58)$. If we order $g$ in cycle length, we get $(58)(96)(14732)$. This corresponds to $a_2=2,a_5=1$ and $a_i=0$ otherwise, which indeed satisfies $\sum_{i=1}^9 ia_i=9$. The question is now how many other permutations will have this same set of cycle lengths. Plugging into the formula (omitting factors with $a_i=0$) yields
$$\frac{9!}{2!\,1!\, 2^2\, 5^1} = 9072.$$
Note that there are naively $9!=362880$ ways of shuffling the numbers in the above 9-permutation. But not all such permutations actually do anything, e.g., the $(58)$ permutation leaves $g$ unchanged as does $(59)(68)$. Using Mathematica I can confirm there are $2!\, 1!\,2^2\,5^1=40$ such permutations, reducing the number of relevant permutations by this factor.
In more algebraic terms, these are the permutations which commute with $g$. This set is known as the centralizer subgroup $C_G(g)$ of $g$ in $G=S_9$, with the order being $|C_G(g)|=40$. The number of distinct permutations with the desired cycle lengths is then the order of the quotient $G/C_G(g)$. But Lagrange's theorem says this is just $|G/C_G(g)|=|G|/|C_G(g)|=9!/40.$ Presumably the remainder of the proof is to show that, in general, there are a total of $|C_G(g)|=\prod_{i=1}^n a_i! i^{a_i}$ permutations which commute with a given $g$.
A: a special case
for example, we set $[a_1,a_2,a_3]=[2,2,1],a_i=0 \ \ \text{for other } i$
we make a transformation for each permutation in $S_9$, to get ALL permutations satisfying the condition.
e.g.  for $123456789 $,
element $1$ consructs a cycle of length $1$,
element $2$ consructs a cycle of length $1$,
element $3,4$ consructs a cycle of length $2$,
element $5,6$ consructs a cycle of length $2$,
element $7,8,9$ consructs a cycle of length $3$ ,
however, resulting permutations are redundant.
Type A appears $1\cdot 1 \cdot 2 \cdot 2 \cdot 3 \cdot 2! \cdot 2! \cdot 1!=48$ times, but contriutes only $\mathbf{1}$ to the answer
Type B appears $1\cdot 1 \cdot 2 \cdot 2 \cdot 3 \cdot 2! \cdot 2! \cdot 1!=48$ times, but contriutes only $\mathbf{1}$ to the answer
Type C appears $1\cdot 1 \cdot 2 \cdot 2 \cdot 3 \cdot 2! \cdot 2! \cdot 1!=48$ times, but contriutes only $\mathbf{1}$ to the answer
...
so we say the answer for this case is $\frac{9!}{1\cdot 1 \cdot 2 \cdot 2 \cdot 3 \cdot 2! \cdot 2! \cdot 1!}=\frac{9!}{1^2\cdot 2^2 \cdot 3^1 \cdot 2! \cdot 2! \cdot 1!}=7560$

general case
for general case, the answer is $\frac{n !}{a_1{!} \cdot a_2 {!} \cdots a_{n} ! \cdot 1^{a_1} 2^{a_2} \cdots n^{a_n}}$
$n!$ means $n!$ permutations to be transformed.
$a 1 ! a_{2} ! \cdots a_{n} !$, because if we do permurations on those parts of the same size ,we get result of the same equivalent class.
$1^{a_1} 2^{a_2} \cdots n^{a_n}$   because cycle of length $j$ can be write in list form in $j$ ways (CircularShift)
multivariate generating function(MGF)
reference:

*

*Advanced Combinatorics COMTET  Page 225 and 233.

*Analytic Combinatorics by Philippe Flajolet, Robert Sedgewick Page 175-176

below is a clip of Advanced Combinatorics COMTET Page 233.


