<s>[INST] How to evaluate $\sum_{k=1}^n\ln\left(2\cos\left(\frac{2\pi\cdot3^k}{3^n+1}\right)+1\right)$ By using wolfram alpha, it seems like that
$$\sum_{k=1}^n\ln\left(2\cos\left(\frac{2\pi\cdot3^k}{3^n+1}\right)+1\right)=0 \text{  for all }n\in\mathbb{N}.$$
But I don't know how to prove this identity.  Thank you very much. 
 [/INST] Taking exponential of both sides, you want
$$ \prod_{k=1}^n \left(2 \cos\left(\dfrac{2\pi\cdot 3^k}{3^n+1}\right)+1\right) = 1 $$
Now note that $1 + 2 \cos(x) = \sin(3x/2)/\sin(x/2)$
and the product telescopes to become
$$\dfrac{\sin \left( \dfrac{3^{n+1}\pi}{3^n+1}\right)}{\sin \left( \dfrac{3 \pi}{3^n+1}\right)} = \dfrac{\sin \left( 3\pi - \dfrac{3\pi}{3^n+1}\right)}{\sin \left( \dfrac{3 \pi}{3^n+1}\right)} = 1$$
</s>