TITLE: What is sum of totatives of n(natural numbers $ \lt n$ coprime to $n$ )?
QUESTION [6 upvotes]: Same question as in title:
What is sum of natural numbers that are coprime to $n$ and are $ \lt n$ ?
I know how to count number of them using Euler's function, but how to calculate sum?

REPLY [5 votes]: Assume $n>2$. Then, if $n/2$ is an integer, then $n/2$ is certainly not a totative. Now it's easy to see that if $k$ is a totative, then $n-k$ is also a totative. So we can split $\phi(n)$ totatives into $\phi(n)/2$ pairs $\{k,n-k\}$, each containing two distinct elements (because $n/2$ isn't a totative) which sum to $n$. So sum of all totatives is $n\cdot\phi(n)/2=\frac{n\phi(n)}{2}$