5

I am having problems proving the following: For what values of $q$ does the following relationship hold $$\sum_{\substack{1\leq d < q\\ \gcd(d,q)=1}}\!\!\!\cos\left(2\pi \cdot \frac{d}{q}\right) =0$$

I have found by computer analysis this may hold true for $q=p^r \cdot k$ where $p$ is any prime and $k$ is an integer and $r$ is an integer greater than one. For example $$q=4,8,9,12,16,18,20,24,25,27,28,32,36,40,44,45,48,49,50,52,54,56,60,63,64,68,72,75,76,80,81,84,88,90,92,96,98,99,100,104,108,112,116,117,120,121,124,125,126,128,132,135,136,140,144,147,148,150,152,153,156,160,162,164,168,169,171,172,175,176,180,184,188,189,192,196,198,200,204,207,208,212...$$ For instance for $q=12$ we have $$\cos\left(2\pi\cdot \frac{1}{12}\right)+\cos\left(2\pi\cdot \frac{5}{12}\right)+\cos\left(2\pi\cdot \frac{7}{12}\right)+\cos\left(2\pi\cdot \frac{11}{12}\right)=0$$

But I am unable to prove this for the general case $q=p^r\cdot k$. Any help would be greatly appreciated.

Jack D'Aurizio
  • 372,937
  • 42
  • 421
  • 888
  • 1
    $\displaystyle\sum_{n=1, gcd(n,q)=1}^q a(n) = \sum_{d | q} \mu(d) \sum_{n=1, d | n}^q a(n)$ where $\mu(d)$ is the Möbius function satisfying $\sum_{d | k} \mu(d) = 1_{k = 1}$ – reuns Aug 21 '17 at 23:50
  • It seems that the sum is equal to $0$ whenever the integer is not square-free, checked it for $\leq 500$ and it seems to be true. –  Aug 21 '17 at 23:53
  • Otherwise, look at the cyclotomic polynomials. – reuns Aug 21 '17 at 23:56
  • 1
    This may be helpful. https://en.wikipedia.org/wiki/Ramanujan%27s_sum – Sungjin Kim Aug 22 '17 at 01:15
  • 1
    It is elementary from reuns's comment that this sum is equal to $\mu(q)$, a fact which can also be found in the Wikipedia article i707107 cites (see $c_q(1)$). And $\mu(q)=0$ precisely when $q$ is divisible by any prime squared. – Erick Wong Aug 22 '17 at 01:26
  • I think d and q can be any number because for any angle like$$ \ alfa = 2π\frac{d}{q} $$ there exists its symmetry about x axis which is $$\beta= 2π-2π\ frac {d}{q} $$ and about y axis which is$$ \beta =π-2π \frac{d}{q} $$. The value of Cos. of each couple cancel each other provided the number of terms of$$\ Sigma$$ is even. – sirous Aug 22 '17 at 12:39

1 Answers1

8

Your sum is the real part of a Ramanujan's sum. Let us consider the cyclotomic polynomial $\Phi_q(x)$: its roots are given by the primitive $q$-th roots of unity, hence: $$ \Phi_q(x) = \prod_{\substack{1\leq d \leq q \\ \gcd(d,q)=1}}\left(x-\exp\frac{2\pi i d}{q}\right)\tag{1} $$ and $\Phi_q(x)$ is a palyndromic polynomial, since if $\xi$ is a primitive $q$-th root of unity we have that $\xi^{-1}$ is a primitive $q$-th root of unity too. The degree of $\Phi_q(x)$ is $\varphi(q)$ and by Vieta's Theorem the following Ramanujan sum $$ \sum_{\substack{1\leq d \leq q \\ \gcd(d,q)=1}}\!\!\!\exp\frac{2\pi i d}{q} $$ is given by the opposite of the coefficient of $x^{\varphi(q)-1}$ in $\Phi_q(x)$, which equals the opposite of the coefficient of $x$ in $\Phi_q(x)$, i.e. $-\left.\frac{d}{dx}\log\Phi_q(x)\right|_{x=0}$. By Moebius inversion formula $$ \Phi_q(x) = \prod_{d\mid q}\left(1-x^d\right)^{\mu\left(\frac{q}{d}\right)}\tag{2} $$ hence: $$ \frac{d}{dx}\log\Phi_q(x)=\sum_{d\mid q}\frac{-d x^{d-1}}{1-x^d}\mu\left(\frac{q}{d}\right) \tag{3} $$ and by evaluating both sides at $x=0$ and exploiting Moebius inversion formula again, we get: $$ \sum_{\substack{1\leq d \leq q \\ \gcd(d,q)=1}}\!\!\!\exp\frac{2\pi i d}{q} = \color{red}{\mu(q)}.\tag{4}$$ The RHS of $(4)$ is always real and we have that

$$\sum_{\substack{1\leq d \leq q \\ \gcd(d,q)=1}}\!\!\!\cos\frac{2\pi d}{q} = 1\quad \Longleftrightarrow\quad \begin{array}{c}q\text{ is a square-free number with}\\\text{an even number of prime factors}\end{array}$$ $$\sum_{\substack{1\leq d \leq q \\ \gcd(d,q)=1}}\!\!\!\cos\frac{2\pi d}{q} = -1\quad \Longleftrightarrow\quad \begin{array}{c}q\text{ is a square-free number with}\\\text{an odd number of prime factors}\end{array}$$ $$\sum_{\substack{1\leq d \leq q \\ \gcd(d,q)=1}}\!\!\!\cos\frac{2\pi d}{q} = 0\quad \Longleftrightarrow\quad q\text{ is not a square-free number.}\tag{5}$$

Jack D'Aurizio
  • 372,937
  • 42
  • 421
  • 888