Formula for sum of divisors
Solution 1:
The equation $\, d \!=\! \prod_{i=1}^k p_i^{\mu_i}, \,$ where $\, 0 \!\leq\! \mu_i \!\leq\! m_i \,$ gives us a bijection between divisors $\,d\,$ of $\,n\,$ and tuples $\, \mu_i \,$ that satisfy $\, 0 \!\leq\! \mu_i \!\leq\! m_i. \,$ Thus $\, \sum_{d|n} f(d) \,$ uniquely corresponds to $\, \sum_{0 \!\leq\! \mu_i \!\leq\! m_i} f(\prod p_i^{\mu_i}). \,$
Solution 2:
This is just substitution, since for each $d\mid n$, $d=\prod p_i^{\mu_i} $ for some $0\le\mu_i\le m_i$, and vice versa...