How to find finite trigonometric products I wonder how to prove ?
$$\prod_{k=1}^{n}\left(1+2\cos\frac{2\pi 3^k}{3^n+1} \right)=1$$
give me a tip
 A: Hint:
First prove that:
$$\prod_{k=0}^n\left(1+2\cos(3^k x)\right) = 1 + 2\sum_{k=1}^{m}\cos(kx)$$
Where:
$$m=\sum_{k=0}^n{3^k} = \frac{3^{1+n}-1}{2}$$
Then show that you are essentially sampling the $\cos$ function between $0$ and $2\pi$ at equal intervals, and since the average is equal to zero, the sum is therefore $1$, as required. To prove the first identity, you can use the Chebyshev relation:
$$\cos(nx)=2\cos(x)\cos((n-1)x)-\cos((n-2)x)$$
A: Let $S_n = \sum_{k=0}^n 3^k = \frac{3^{n+1}-1}{2}$.  Then
$$3^{n}- S_{n-1} = 3^{n} - \frac{3^{n}-1}{2} = \frac{3^{n}+1}{2} = S_{n-1}+1.
$$
Now by induction we have the following product identity for $n \geq 0$:
$$
\begin{eqnarray}
\prod_{k=0}^{n}\left(z^{3^k}+1+z^{-3^k}\right) &=& \left(z^{3^{n}}+1+z^{-3^{n}}\right)\prod_{k=0}^{n-1}\left(z^{3^k}+1+z^{-3^k}\right) \\
&=& \left(z^{3^{n}}+1+z^{-3^{n}}\right) \left(\sum_{k=-S_{n-1}}^{S_{n-1}} z^k\right) \\
&=&\sum_{k=S_{n-1}+1}^{S_n}z^k + \sum_{k=-S_{n-1}}^{S_{n-1}}z^k+\sum_{k=-S_n}^{-S_{n-1}-1} z^k \\
&=& \sum_{k=-S_n}^{S_n} z^k
\end{eqnarray}
$$
Now take $z = \exp\left(\frac{\pi \, i}{3^n + 1}\right)$ and use that $z^{3^n+1}=-1$ to get
$$\begin{eqnarray}
\prod_{k=0}^n\left(1 + 2 \cos \left(\frac{2 \pi \,3^k}{3^n+1}\right)\right) &=& \sum_{k=-S_n}^{S_n}z^{2k} = \frac{z^{2S_n+1}-z^{-2S_n-1}}{z-z^{-1}} = \frac{z^{3^{n+1}}-z^{-3^{n+1}}}{z-z^{-1}} \\
&=& \frac{z^{3(3^n+1)-3} - z^{-3(3^n+1)+3}}{z-z^{-1}} = \frac{z^3-z^{-3}}{z-z^{-1}} = z^2 + 1 + z^{-2} \\
&=& 1 + 2\cos\left(\frac{2\pi}{3^n+1}\right)
\end{eqnarray}$$
and your identity follows.
