TITLE: Nice formula for $\sum\limits_{d|n}(-1)^{n/d}\Phi(d)$?
QUESTION [5 upvotes]: How do I evaluate
$$\sum_{d|n}(-1)^{n/d}\Phi(d)?$$
$\Phi(d)$ is Euler's totient function. Thanks.

REPLY [5 votes]: We are performing Dirichlet convolution on $(-1)^k$ and $\Phi(k)$. The corresponding Dirichlet generating functions of these two sequences are
$$\begin{align*}\frac{\zeta(s-1)}{\zeta(s)}&=\sum_{k=1}^\infty \frac{\Phi(k)}{k^s}\\(2^{1-s}-1)\zeta(s)&=\sum_{k=1}^\infty \frac{(-1)^k}{k^s}\end{align*}$$
where $\zeta(s)$ is Riemann's function.
The product of these two generating functions is the generating function of the convolution; we thus seek the Dirichlet series for $(2^{1-s}-1)\zeta(s-1)$.
We have the Dirichlet $\lambda$ function
$$\lambda(s)=\sum_{k=1}^\infty \frac{1-(-1)^k}{2k^s}=(1-2^{-s})\zeta(s)$$
and we see that our generating function is precisely $-\lambda(s-1)$. Thus, the Dirichlet convolution of $\Phi(k)$ and $(-1)^k$ is
$$-\dfrac{k(1-(-1)^k)}{2}=\begin{cases}-k&\text{odd }k\\0&\text{even }k\end{cases}$$