This is Pillai's arithmetical function as in OEIS A018804

Formulae given there include $$\sum_{d|n} d \,\phi(n/d)$$ and $$\sum_{d|n} d \, \tau(d) \, \mu(n/d)$$ where $\phi(n)$ is Euler's totient function, $\tau(n)$ is the number of divisors and $\mu(n)$ is the Möbius function.