2.1.17 $\underset{\star}{\star \star}$ (1) Let $n$ be a prime number greater than 3. Find the value of $\left(1+2 \cos \frac{2 \pi}{n}\right)(1+$ $\left.2 \cos \frac{4 \pi}{n}\right)\left(1+2 \cos \frac{6 \pi}{n}\right) \cdots \cdots \cdot\left(1+2 \cos \frac{2 n \pi}{n}\right)$;
(2) Let $n$ be a natural number greater than 3. Find the value of $\left(1+2 \cos \frac{\pi}{n}\right)\left(1+2 \cos \frac{2 \pi}{n}\right)\left(1+2 \cos \frac{3 \pi}{n}\right) \cdots$. $\left(1+2 \cos \frac{(n-1) \pi}{n}\right)$.
(1) Let $w=e^{\frac{2 x i}{n}}$. Clearly, $w^{n}=1, w^{-\frac{n}{2}}=-1, w^{k}+w^{-k}=2 \cos \frac{2 k \pi}{n}$. Therefore, we have
$$
\begin{aligned}
\prod_{k=1}^{n}\left(1+2 \cos \frac{2 k \pi}{n}\right) & =\prod_{k=1}^{n}\left(1+w^{k}+w^{-k}\right)=\prod_{k=1}^{n} w^{-k}\left(w^{k}+w^{2 k}+1\right) \\
& =w^{-\frac{n(n+1)}{2}} \prod_{k=1}^{n-1} \frac{1-w^{3 k}}{1-w^{k}} \cdot\left(w^{n}+w^{2 n}+1\right) \\
& =(-1)^{n+1} \cdot 3 \cdot \prod_{k=1}^{n-1} \frac{1-w^{3 k}}{1-w^{k}} .
\end{aligned}
$$

Since $n$ is a prime number greater than 3, $(-1)^{n+1}=1$, and $3 \times 1, 3 \times 2, \cdots, 3(n-1)$ $(\bmod n)$, cover all the residue classes of $n$. Therefore, $\prod_{k=1}^{n-1}\left(1-w^{3 k}\right)=\prod_{k=1}^{n-1}\left(1-w^{k}\right)$, and thus
$$
\prod_{k=1}^{n}\left(1+2 \cos \frac{2 k \pi}{n}\right)=3 \text {. }
$$

(2) Since the $2n$ roots of $z^{2 n}-1=0$ are $\pm 1$ and $z_{k}=\mathrm{e}^{\pm \frac{k \pi i}{n}}$ $(k=1,2, \cdots, n-1)$, we have
$$
z^{2 n}-1=\left(z^{2}-1\right) \prod_{k=1}^{n-1}\left(z-\mathrm{e}^{\frac{k \pi i}{n}}\right)\left(z-\mathrm{e}^{-\frac{k \pi i}{n}}\right)=\left(z^{2}-1\right) \prod_{k=1}^{n-1}\left(z^{2}+1-2 z \cos \frac{k \pi}{n}\right) \text {. }
$$

Let $z=\mathrm{e}^{2 \pi i}$, then $z^{2}+1=-z$, so we have
$$
\begin{array}{c}
z^{2 n}-1=\left(z^{2}-1\right)(-z)^{n-1} \prod_{k=1}^{n-1}\left(1+2 \cos \frac{k \pi}{n}\right), \\
\prod_{k=1}^{n-1}\left(1+2 \cos \frac{k \pi}{n}\right)=\frac{z^{2 n}-1}{\left(z^{2}-1\right)(z)^{n-1}},
\end{array}
$$

When $n=3 k$, $z^{2 n}=z^{6 k}=\left(\mathrm{e}^{\frac{2 \pi i}{3}}\right)^{6 k}=1$, so in this case $\prod_{k=1}^{n-1}\left(1+2 \cos \frac{k \pi}{n}\right)=0$; when $n=3 k+1$, $z^{2 n}=z^{6 k+2}=z^{2}$, so in this case
$$
\prod_{k=1}^{n-1}\left(1+2 \cos \frac{k \pi}{n}\right)=\frac{z^{2}-1}{\left(z^{2}-1\right)(-z)^{3 k}}=(-1)^{3 k}=(-1)^{n-1} ;
$$

When $n=3 k+2$, $z^{2 n}=z^{6 k+4}=z$, so in this case
$$
\begin{aligned}
\prod_{k=1}^{n-1}\left(1+2 \cos \frac{k \pi}{n}\right) & =\frac{z-1}{\left(z^{2}-1\right)(-z)^{3 k+1}}=(-1)^{3 k+1} \cdot \frac{z-1}{\left(z^{2}-1\right) \cdot z} \\
& =(-1)^{3 k+1} \frac{z-1}{z^{3}-z}=(-1)^{3 k+1} \frac{z-1}{1-z}=(-1)^{3 k+2}=(-1)^{n}
\end{aligned}
$$

In summary, we have
$$
\prod_{k=1}^{n-1}\left(1+2 \cos \frac{k \pi}{n}\right)=\left\{\begin{array}{ll}
0, & n=3 k \text { when, } \\
(-1)^{n-1}, & n=3 k+1 \text { when, } \\
(-1)^{n}, & n=3 k+2 \text { when. }
\end{array} \quad\left(k \in \mathbf{N}^{*}\right)\right.
$$