Suppose I have the following sum: Let $n=qr$
$$S_n=\sum_{j=0}^{r-1}(-1)^{qj}\cos^n{\left(\frac{j\pi}{r}\right)}$$
I am interested in which values of $r>1$ produce an integer $k$ for all $n>0$. I'm not even sure how to approach this problem, save to say that at least for certain values of $j$ and $r$, cosine can equal $\pm 1$ or 0. But how can this be shown to be an integer for $r>1$ if at all? Should I use the Euler formula $e^{in\theta}=\cos{n\theta}+I\sin{n\theta}$ and distinguish real and imaginary parts in order to help?