21. (1) Use $m$ colors to color the 6 vertices of a regular octahedron (assuming these 6 vertices are indistinguishable), how many different coloring schemes are there?
(2) Change to using $m$ colors to color the 8 faces of a regular octahedron, how many different coloring schemes are there?
21. (1) As shown in the figure, $N=\{1,2,3,4,5,6\}$, the permutations in the permutation group $G$ are divided into 4 categories:
The first category is the identity permutation, which has only one, i.e., $P_{1}=I=(1)(2)(3)(4)(5)(6)$.

The second category consists of permutations that rotate $90^{\circ}$, $180^{\circ}$, and $270^{\circ}$ counterclockwise about the line connecting opposite vertices. There are $3 \times 3=9$ such permutations. For example, the permutations that rotate $90^{\circ}$, $180^{\circ}$, and $270^{\circ}$ counterclockwise about the line through vertices 1 and 6 are
$$
\begin{array}{l}
P_{2}=(1)(2345)(6), P_{3}=(1)(24)(35)(6), \\
P_{3}=(1)(5432)(6) .
\end{array}
$$

The third category consists of permutations that rotate $180^{\circ}$ about the line connecting opposite edges. There are 6 such permutations. For example, the permutation that rotates $180^{\circ}$ about the line $v_{1} v^{\prime}$ is $P_{11}=(16)(23)(45)$.

The fourth category consists of permutations that rotate $120^{\circ}$ and $240^{\circ}$ counterclockwise about the line connecting the centers of opposite faces. There are $4 \times 2=8$ such permutations. For example, the permutations that rotate $120^{\circ}$ and $240^{\circ}$ counterclockwise about the line $w_{1} w^{\prime}$ are
$$
P_{17}=(123)(456), P_{18}=(321)(654) \text {. }
$$

Thus, $G$ contains a total of $1+9+6+8=24$ permutations. By Theorem 1, the number of different coloring schemes is
$$
\begin{aligned}
M & =\frac{1}{24} \sum_{i=1}^{24} m^{C\left(P_{i}\right)}=\frac{1}{24}\left(m^{6}+6 m^{3}+3 m^{4}+6 m^{3}+8 m^{2}\right) \\
& =\frac{1}{24}\left(m^{6}+3 m^{4}+12 m^{3}+8 m^{2}\right) .
\end{aligned}
$$
(2) Similarly, the number of coloring schemes is $\frac{1}{24}\left(m^{8}+17 m^{6}+6 m^{2}\right)$.