On a certain series of cosines

28 Views Asked by At

For natural numbers $p$ and $q$, compute the value of $$\displaystyle \sum_{k=0}^{q-1} \cos^{p} \left(\dfrac{2\pi k}{q}\right).$$

I got the answer $$\dfrac{q}{2^p} \sum_{l=1}^{p} \binom{p}{l} \mathbb{1}_{\{q|p-2l\}}.$$

Here $\mathbb{1}_{E}$ represents the indicator function of the event $E$.

I am hoping that my answer is right. I want to know if there is a closed form expression for my answer.