As title, is there a way to simplify the sum $\sum_{1 \leq j \leq i, \gcd(i, j) > 1} \gcd(i, j)$ for some given $i$? I have tried to write $i$ into its prime factorisation $\prod_{i=1}^{k}{p_i}^{e_i}$, but can't seem to proceed after it as $j$ does not need to be a factor of $i$.
Thank you