Closed form for $\sum\limits_{d|n}\sigma(d)$? Is there any closed form for $$\sum\limits_{d|n}\sigma(d)$$? I knew that $\sum\limits_{d|n}1=\sigma(n)$ therefore we must have $\sum\limits_{d|n}\sigma(d)=\sum\limits_{d|n}\sum\limits_{r|d}1$ but how do I manupulate the last sum?
 A: It is well known that for a natural number $n$ whose factorization into primes is
$$n= p_1^{e_1} \cdots p_r^{e_r}$$
we have
$$\sigma(n) = \sum_{d|n}1 = (e_1+1) \cdots (e_r+1) = \prod_{i=1}^r \binom{e_i+1}{1}$$
Similarly, I can show you that
$$\sum_{d|n} \sigma(d) = \prod_{i=1}^r \binom{e_i+2}{2}$$
Firstly, we can write
$$\sum_{d|n} \sigma(d) = \sum_{s|d|n}1$$
so that $\sum_{d|n} \sigma(d)$ counts the number of couples $(s,d)$ with $s,d \in \{ 1, \dots, n\}$ such that $s|d$ and $d|n$. At every such couple you can associate the couple $(s, d/s)$: so that $\sum_{d|n} \sigma(d)$ counts the number of couples $(s,k)$ with $s,k \in \{ 1, \dots, n\}$ such that $sk|n$ (with $d=sk$).
In order to produce such a couple $s,k$ you have to choose for every prime $p_i$ dividing $n$ what is the power of $p_i$ which occurs in the factorization of $s$ and $k$ respectively, say $f_i$ and $g_i$ respectively, and you need the condition
$$0 \le f_i+g_i \le e_i$$
Using the standard "stars and bars" method, you can see that such couples $(f_i,g_i)$ are exactly $\binom{e_i+2}{2}$, and this concludes the proof of the formula.
A: Let me write my comment as an answer. We shall use the fact that $\sum\limits_{d\mid n}f(d)$ is multiplicative whenever $f$ is multiplicative (this is very simple to prove so I don't find it necessary to write its proof). Assuming we know the prime factorization of $n$ we can do something. The function $\sigma$ is multiplicative so the function $f(n):=\sum\limits_{d\mid n}\sigma(d)$ is multiplicative, which implies that $f(n)=\prod\limits_{p\mid n,\;\text{$p$ prime}}\left(\sum\limits_{k=0}^{\alpha(p)}\sigma\left(p^k\right)\right),$ where $\alpha(p):=\lfloor\log n/\log p\rfloor,$ but for each $k,$ we have $\sigma\left(p^k\right)=k+1$ so $$\begin{aligned}f(n)&=\prod_{p\mid n,\;\text{$p$ prime}}\left(\sum_{k=0}^{\alpha(p)}(k+1)\right)\\\\&=\prod_{p\mid n,\;\text{$p$ prime}}\left(\dfrac{(\alpha(p)+1)(\alpha(p)+2)}{2}\right)\end{aligned}.$$
