$g(m)$ is a multiplicative fuction. $g(m)=\sum_{n=1, (n,m)=1}^{n=m} e^{2\pi i n /m}$ 
I tried but didnt able to show it. Also how to show that $g(p)=-1$ for $p$ prime. I tried it just by splitting the series and collecting the terms but that doesn’t worked out!!!
 A: Introducing
$$g(n) = \sum_{q=1, (n,q)=1}^n e^{2\pi i q/n}$$
we observe that with an Iverson bracket
$$[[n=1]] = \sum_{q=1}^n e^{2\pi i q/n}
= \sum_{d|n} \sum_{q=1, (n,q)=d}^n e^{2\pi i q/n}
= \sum_{d|n} \sum_{p=1, (n,pd)=d}^{n/d} e^{2\pi i pd/n}
\\ = \sum_{d|n} \sum_{p=1, (n/d,p)=1}^{n/d} e^{2\pi i p/(n/d)}
= \sum_{d|n} g(n/d) = \sum_{d|n} g(d).$$
We thus have by Mobius inversion that
$$g(n) = \sum_{d|n} [[d=1]] \mu(n/d) = \mu(n).$$
Now to see that $\mu$ is  multiplicative we want to show that $\mu(mn)
= \mu(m)\mu(n)$ when  $(m,n)=1.$ There are two cases, at  least one of
$m$ and $n$ is not squarefree or  both are squarefree. Let $P$ and $Q$
be the  primes that divide  $m$ and  $n$ respectively, so  that $P\cap
Q=\emptyset.$ For the first case  $\mu(mn)$ is zero because the primes
with exponent  at least two  in the  factorizations of $m$  and/or $n$
appear unchanged in $mn,$ which is therefore not squarefree either. We
also have zero for $\mu(m)\mu(n)$ because at least one of these is not
squarefree. This leaves  the case of $m$ and $n$  being squarefree. We
get for $\mu(mn)$  the value $(-1)^{|P|+|Q|}$ and  for $\mu(m)\mu(n) =
(-1)^{|P|} (-1)^{|Q|}$ and we have agreement here as well, proving the
claim.
