Proving a relation between sum of reciprocal of divisors and $\sigma(n)$

Prove that $$\sum_{d\mid n}\dfrac{1}{d}=\dfrac{\sigma(n)}{n}\ \forall\ n\geq 1, n\in \mathbb Z$$

My question and my approach is a lot similar to this question and a bit different from this question but just a bit short, I want to verify my approach. Here it goes:

My Approach:

Suppose $$\sum_{d\mid n}\dfrac{1}{d}=\dfrac{1}{d_1}+\dfrac{1}{d_2}+\cdots+\dfrac{1}{d_r}$$

Thus $$\sum_{d\mid n}\dfrac{1}{d}=\dfrac{\prod_{d\mid n,\space d\neq d_1}d+\prod_{d\mid n,\space d\neq d_2}d+\cdots+\prod_{d\mid n,\space d\neq d_r}d}{\prod_{d\mid n}d}$$

Now $$\prod_{d\mid n}d=n^{\tau(n)/2}$$ and $$\prod_{d\mid n,\space d\neq d_i}d=d_jn^{\tau(n)/2-1}$$ where $$d_id_j=n$$

This means that the numerator equals to $$(d_1+d_2+\ldots+d_r)n^{\tau(n)/2-1}$$ or $$\sigma(n)n^{\tau(n)/2-1}$$

$$\therefore \sum_{d\mid n}\dfrac{1}{d}=\dfrac{\sigma(n)n^{\tau(n)/2-1}}{n^{\tau(n)/2}}=\dfrac{\sigma(n)}{n}$$

For the special case when $$n$$ is a perfect square, say $$n=m^2$$, then $$n^{\tau(n)/2}$$ can be written as $$m^{\tau(n)}$$ and $$n^{\tau(n)/2-1}$$ can be written as $$m^{\tau(n)-2}$$.

Please check my method. I am also trying to search for a more simple method than this. Thus any suggestions would be welcome.

THANKS

• $$\sum_{d|n} \frac{1}{d^k}=\frac{\sigma_k(n)}{n^k}$$ Oct 25 '20 at 12:59
• @Raffaele, I'm sorry, but I couldn't understand what you meant by this and its relation to the given question. Can you please elaborate? Sorry if i didn't get this Oct 25 '20 at 13:20
• It's a generalization of your property. $\sigma_k(n)$ is the sum of the $k$-th power of the divisors of $n$. If $n=15$ then $$1+\frac{1}{27}+\frac{1}{125}+\frac{1}{3375}=\frac{1+ 27+ 125+ 3375}{15^3}=\frac{392}{375}$$ Oct 25 '20 at 13:25
• @Raffaele, Oh, Alright I get it now. Thanks for sharing this generalization. Oct 25 '20 at 13:30