Example 4-8 A transparent grid of length $n$, is to be colored using 4 colors: red, blue, yellow, and green. How many different coloring schemes are there?

 untranslated part:
试问有多少种不同的方案? 

translated part:
How many different schemes are there?
The problem is equivalent to constructing a string of length $n$ using $r, b, y, g$, and considering the order of characters from left to right and from right to left as the same, for example, $y g g r b r$ and $r b r g g y$ are considered the same.

Group $G$:
$$
\left(\begin{array}{cccc}
1 & 2 & \cdots & n \\
1 & 2 & \cdots & { }_{n}
\end{array}\right)\left(\begin{array}{ccccc}
1 & 2 & \cdots & n-1 & n \\
n & n-1 & \cdots & 2 & 1
\end{array}\right)
$$

According to Pólya's theorem, the number of different schemes should be:
$$
N=\frac{1}{2}\left(4^{n}+4^{\frac{n \cdot 1}{2}}\right)
$$