We know the sum of all primitive n-th roots of unity is the Möbius function, as shown in this question. $$ \sum_{\substack{k=1 \newline (k,n)=1}}^n{\mathrm{e}^{i\frac{2\pi k}{n}}}=\mu(n) $$ But what about the sum of the p-th powers of all primitive n-th roots of unity? $$ \sum_{\substack{k=1 \newline (k,n)=1}}^n{\mathrm{e}^{i\frac{2\pi k}{n}p}} $$ I tried the same approach as in the top answer of this question, resulting in $$ \sum_{(k,n)=1}{e^{i2\pi kp/n}}=\sum_{d|n}{\mu(d)\sum_{l=1}^{n/d}e^{i2\pi dlp/n}}=\sum_{\substack{d|n \newline n|dp}}{\mu(d)\frac{n}{d}} $$ And I don't know how to proceed to a useful result, as asked in that question.
- 4,665
- 4
- 16
- 49
-
2these are called Ramanujan sums $c_n(p)$ and there is a lot known and a lot unknown about them; see https://en.wikipedia.org/wiki/Ramanujan%27s_sum – Conrad Oct 09 '23 at 15:10
-
1@Conrad Thanks for pointing out. there is an expression for general n and p: https://mathworld.wolfram.com/RamanujansSum.html. I would be glad if I could find a proof for it. – Zhicheng ZHANG Oct 10 '23 at 03:00
2 Answers
Thank Conrad for the hints. I have found another elegant proof.
For a primitive n-th root of unity $e^{i\frac{2\pi k}{n}}, (k,n)=1$, we find $\left(\frac{kp}{(p,n)},\frac{n}{(p,n)}\right)=1$
Therfore $e^{i\frac{2\pi kp}{n}}$ is a primitive $\frac{n}{(p,n)}$-th root of unity. We can thus find an integer $m$ which satisfies $pm/(p,n)\equiv 1 \ (\text{mod}\ n/(p,n))$, and define a homomorphism between the multiplicative groups of integers modulo $n$ and modulo $\frac{n}{(p,n)}$, $$ \begin{aligned} f: (\mathbb{Z}/n\mathbb{Z})^\times&\rightarrow \left(\mathbb{Z}\left/\frac{n}{(p,n)}\right.\mathbb{Z}\right)^\times \\ k&\rightarrow \frac{kpm}{(p,n)} \ \text{mod}\ \frac{n}{(p,n)} \end{aligned} $$ From the fundamental theorem on homomorphisms, we have $$ \lvert\text{ker}(f)\rvert=\lvert\mathbb{Z}_n^\times\rvert\left/\lvert\mathbb{Z}_{n/d}^\times\rvert\right.=\frac{\phi(n)}{\phi(n/d)} $$ where $d\equiv(p,n)$, $\phi$ is the Euler's totient function. $f$ maps $\frac{\phi(n)}{\phi(n/d)}$ primitive n-th roots to one primitive $\frac{n}{(p,n)}$-th root of unity, so we can rewrite the sum as $$ \sum_{\substack{k=1 \newline (k,n)=1}}^n{e^{i\frac{2\pi kp}{n}}}=\frac{\phi(n)}{\phi(n/d)}\sum_{\substack{l=1 \newline (l,n/d)=1}}^{n/d}{e^{i\frac{2\pi l}{n/d}}}=\frac{\phi(n)}{\phi(n/d)}\mu(n/d)=\frac{\phi(n)}{\phi(n/(p,n))}\mu\left(\frac{n}{(p,n)}\right) $$
Using the formula from the OP in the form $$c(p,n)=c_n(p)=\sum_{\substack{k=1 \newline (k,n)=1}}^n{\mathrm{e}^{i\frac{2\pi k}{n}p}}=\sum_{d|(n,p)}d\mu(n/d)$$ it immediately follows that $c$ is multiplicative in the variable $n$ and "almost multiplicative" in the variable $p$, so $$c(p, nm)=c(p,n)c(p,m), (m,n)=1$$ and $$c(pq,n)\mu(n)=c(p,n)c(q,n), (p,q)=1$$ with the first being obvious since $d|(nm,p)$ means $d=d_1d_2, d_1|(n,p), d_2|(m,p)$ and $\mu(nm/d)=\mu(n/d_1)\mu(m/d_2)$, while the second is a bit less obvious but follows from the (easily verified) identity $\mu(n/(d_1d_2))\mu(n)=\mu(n/d_1)\mu(n/d_2)$ when $(d_1,d_2)=1$ are divisors of $n$
The above clearly imply $$c(pq, nm)=c(p,n)c(q,m), (pn, mq)=1$$ (for example keeping in mind that $c(p,m)=\mu(m), (p,m)=1$ and that both sides are $0$ if $\mu(m)\mu(n)=0$ from the above)
By multiplicativity the function $a(p,n)=\mu(n/(n,p))\phi(n)/\phi((n/(n,p))$ satisfies $$a(pq, nm)=a(p,n)c(q,m), (pn, mq)=1$$ so it follows that to prove $c(p,n)=a(p,n)$ it is enough to do it when $p=p_1^a, n=p_1^b, p_1$ prime and $a,b \ge 0$
Here we have three cases:
$b \le a$ then $(p,n)=n$ so $a(p,n)=\phi(n)$ while $c(p,n)=\sum_{d|n}d\mu(n/d)=\phi(n)$ by Mobius inversion (or just simple check for $n=p_1^b$)
$b \ge a+2$ and then $a(p,n)=0$ and $c(p,n)=0$ since $d|p$ means $p_1^2 |n/d$ so all $\mu(n/d)=0$ in the sum for $c(p,n)$
$b=a+1$ when $a(p,n)=\mu(p_1)\phi(p_1^b)/\phi(p_1)=-\frac{p_1^b-p_1^{b-1}}{p_1-1}=-p_1^{b-1}$ while $c(p,n)=-p_1^a=-p_1^{b-1}$
Hence the formula $$c(p,n)=\frac{\mu(n/(n,p))\phi(n)}{\phi((n/(n,p))}$$ is proven
- 31,769