Example 7.12 Find the number of second-kind circular permutations formed by selecting 6 elements with repetition from the 3-element set $A=\{a, b, c\}$.
The number of the second kind of circular permutations is
$$
\begin{aligned}
M_{3}(6) & =\frac{1}{2 \times 6} \sum_{d \mid 6}^{1} \varphi(d) 3^{\frac{6}{d}}+\frac{1}{4}\left(3^{\frac{6}{2}}+3^{\frac{6+2}{2}}\right) \\
& =\frac{1}{2} \times 130+\frac{1}{4}\left(3^{3}+3^{4}\right)=65+27=92 .
\end{aligned}
$$