<s>[INST] Find how many different circular bracelets can be formed using $6n$ blue and $3$ red beads, where $n$ is a positive integer. Find how many different circular bracelets can be formed using $6n$
blue and $3$ red beads, where $n$ is a positive integer.  

As these are circular permutations where flipping does not make any change $$ \frac{1}{2}\frac{(6n+2)!}{3!(6n)!}$$
This simplifies to $$\frac{18n^2+9n+1}{6} $$
But the answer given is $3n^2+3n+1$.
I tried to think like this that between the $3$ red ones the number blue beads can be put is number of integral solution to $$x+y+z=6n $$
This gives $18n^2+9n+1$. Surely I am counting the same arrangement more than once. How do I eliminate those ?
 [/INST] Here is  the solution using  the Polya Enumeration Theorem  (PET).  We
require  the cycle  index of  the  dihedral group  acting on  $m=6n+3$
slots. Observe that $m$ is odd. We thus have for the cycle index
$$Z(D_m)
= \frac{1}{2m} \sum_{d|m} \varphi(d) a_d^{m/d}
+ \frac{1}{2} a_1 a_2^{(m-1)/2}.$$
The desired quantity is given by
$$[A^{6n} B^3] Z(D_m)(A+B).$$
Actually doing the substitution we get
$$[A^{6n} B^3]
\left(\frac{1}{2m} \sum_{d|m} \varphi(d) (A^d+B^d)^{m/d}
+ \frac{1}{2} (A+B) (A^2+B^2)^{(m-1)/2}\right).$$
Working with the first term we  see that we can obtain $B^3$ only from
the terms for $d=1$ and $d=3$ which yields
$$\frac{1}{2m} [A^{6n} B^3]
\left( (A+B)^m + 2(A^3+B^3)^{m/3} \right).$$
This is
$$\frac{1}{2m} {m\choose 3} + 
\frac{1}{2m}2 {m/3\choose 1}.$$
Continuing with the second term we must have $B^2$ from the power term
and get
$$\frac{1}{2} {(m-1)/2\choose 1}.$$
Collecting the three contributions yields
$$\frac{1}{12} (m-1)(m-2) 
+ \frac{1}{3} + \frac{1}{4} (m-1)
= \frac{1}{12} m^2 + \frac{1}{4}
\\ = 3n^2+3n+1.$$
</s>