A different type of sum of divisors Let $n\geq 1$ be a natural number. I would like to find the quantity:
$$\sum\limits_{d_1 | n}\sum\limits_{\substack{d_2 | n \\ d_3|n \\ (d_2,d_3)=d_1}}d_3.$$
My guess is that the result could be $\tau(n)\sigma(n)$, where $\tau(n)$ is the number of divisors of $n$ and $\sigma(n)$ is the sum of these divisors. Any tip is appreciated.
 A: Why, let's see. How many times each divisor has the chance to be a $d_3$? Let's run through all pairs of divisors $\{d_2,d_3\}$. Every time their GCD is also a divisor of $n$ (some $d_1$), the $d_3$ gets included in the summation. But wait, their GCD is always a divisor! So the outer sum is nothing but smoke and mirrors. Your quantity simplifies to
$$\sum\limits_{\substack{d_2|n\\d_3|n\\\color{green}{(d_2,d_3)=\text{anything}\hspace -3.5em}}}d_3$$
which is trivially equivalent to $\tau(n)\cdot\sigma(n)$, just as you expected.
A: 
We obtain
  \begin{align*}
\color{blue}{\sum\limits_{d_1 | n}\sum\limits_{\substack{d_2 | n \\ d_3|n \\ (d_2,d_3)=d_1}}d_3}
&=\sum\limits_{\substack{d_2 | n \\ d_3|n}}d_3=\sum_{d_2|n}\sum_{d_3|n}d_3\tag{1}\\
&=\left(\sum_{d_2|n}1\right)\left(\sum_{d_3|n}d_3\right)\\
&\color{blue}{=\tau(n)\sigma(n)}
\end{align*}
  and the claim follows.

In (1) we observe that the left-hand sum $\sum_{d_1|n}\sum\limits_{\substack{d_2 | n \\ d_3|n \\ (d_2,d_3)=d_1}}d_3$ has the same $\left(\tau(n)\right)^2$ summands as the right-hand sum  but with some kind of ordering with respect to the divisors  of $n$.
