1

The question is : how can I compute the sum : $$S(n)=\displaystyle \sum_{k=1}^n \cos\left(\frac{2k\pi}{n}\right) $$ where $\gcd(k,n)=1$

Where $n$ is prime, $S(n)=-1$ because $\displaystyle \sum_{k=0}^n \cos\left(\frac{2k\pi}{n}\right) = 0$

By calculating the first values of the sequence (for $1 \leq n \leq 20$), we obtain : $$1, -1, -1, 0, -1, 1, -1, 0, 0, 1, -1, 0, -1, 1, 1, 0, -1, 0, -1, 0$$ The closest sequence in OEIS is : https://oeis.org/A355690

It seems that if : $$n= \prod_{k=1}^{r}p_k^{a_k} \qquad i \not =j \Rightarrow p_i\not = p_j$$ We have : $S(n) = 0$ if $\exists 1\leq k \leq r, \; \alpha_k> 1$ and $S(n)= (-1)^r$ otherwise.

I suspect it is related to the cyclotomic polynomials. How can it be proved?

0 Answers0