<s>[INST] For odd $k$, $\sum_{j=0}^{N-1}\cos^k(\pi j/N) = 1$. Is there a nicer proof? Is this well known? In the course of answering this question, I stumbled into the following result: for any integer $N > 1$ and any odd $k$,
$$
\sum_{j=0}^{N-1}\cos^k(\pi j/N) = 1.
$$
My proof, which I suspect is much more complicated than it needed to be, was as follows:
\begin{align}
\sum_{j=0}^{N-1}\cos^k\left(\frac{\pi j}{N}\right) &= 
\sum_{j=0}^{N-1} 2^{-k}(\omega^{j} + \omega^{-j})^k
\\ & = 
2^{-k} \sum_{j=0}^{N-1} \sum_{\ell = 0}^k \binom k{\ell}\omega^{(k - 2\ell)j}
\\ & = 
2^{-k}  \sum_{\ell = 0}^k \binom{k}{\ell} \sum_{j=0}^{N-1}\omega^{(k - 2\ell)j}
\\ & = 
2^{-k}   \sum_{\ell = 0}^k \binom{k}{\ell}
\cdot \begin{cases}
\frac {1 - \omega^{(k - 2\ell)N}}{1 - \omega^{(k - 2\ell)}} 
& 2N \nmid (k - 2\ell)\\
N & 2\ell = k
\end{cases}
\\ & = 
2^{-k}   \sum_{\ell = 0}^k \binom{k}{\ell}
\cdot \begin{cases}
\frac {1 - (-1)^{(k - 2\ell)}}{1 - \omega^{(k - 2\ell)}} 
& 2N \nmid (k - 2\ell)\\
N & 2\ell = k
\end{cases}
\\ & = 
2^{-k}   \sum_{\ell = 0}^k \binom{k}{\ell} \frac {1 - (-1)}{1 - \omega^{k - 2\ell}}
\\ & = 
2^{-k} \sum_{\ell = 0}^k \binom{k}{\ell} \frac 2{1 - \omega^{k - 2\ell}}
\\ &= 
2^{-k} \sum_{m = 0}^{(k-1)/2} \binom{k}{m} \left[\frac 2{1 - \omega^{k - 2m}} + \frac 2{1 - \omega^{-(k - 2m)}}\right]
\\ & = 
2^{-k} \sum_{m = 0}^{(k-1)/2} \binom{k}{m} 4\operatorname{Re}\left[\frac 1{1 - \omega^{k - 2m}}\right]
\\ & = 
2^{-k} \sum_{m = 0}^{(k-1)/2} \binom{k}{m} 4\operatorname{Re}\left[\frac {1 - \omega^{-(k - 2m)}}{|1 - \omega^{k - 2m}|^2}\right]
\\ & = 
2^{-k} \sum_{m = 0}^{(k-1)/2} \binom{k}{m} 4\operatorname{Re}\left[\frac {(1 - \cos((k - 2m)\pi/N)) + i\sin((k - 2m)\pi/N)
}{(1 - \cos((k - 2m)\pi/N))^2 + \sin^2((k - 2m)\pi/N)}\right]
\\ & = 
2^{-k} \sum_{m = 0}^{(k-1)/2} \binom{k}{m} 4
\frac{1 - \cos((k - 2m)\pi/N)}{2(1 - \cos((k - 2m)\pi/N))}
\\ & = 
2^{-k} \sum_{m = 0}^{(k-1)/2} 2\binom{k}{m}
 = 
2^{-k} \sum_{m = 0}^{k} \binom{k}{m} = 1
\end{align}
Is there a nicer proof? Is this fact well known?
 [/INST] The result follows since $\cos \pi j/N=-\cos \pi (N-j)/N$ for $j=1,..N-1$, while for $j=0$ we get $1$. Now $a=-b$ implies $a^k=-b^k$ for any odd $k$. So all but the first term cancel in pairs (and the middle term is zero for $N$ even)
</s>