Pillai's arithmetical function

In number theory, the gcd-sum function, also called Pillai's arithmetical function, is defined for every $$n$$ by


 * $$P(n)=\sum_{k=1}^n\gcd(k,n)$$

or equivalently


 * $$P(n) = \sum_{d\mid n} d \varphi(n/d)$$

where $$d$$ is a divisor of $$n$$ and $$\varphi$$ is Euler's totient function.

it also can be written as


 * $$P(n) = \sum_{d \mid n} d \tau(d) \mu(n/d)$$

where, $$\tau$$ is the divisor function, and $$\mu$$ is the Möbius function.

This multiplicative arithmetical function was introduced by the Indian mathematician Subbayya Sivasankaranarayana Pillai in 1933.