# Sum of divisors function

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If $k=p_1^{\alpha_1}\cdot\dots\cdot p_n^{\alpha_n}$ is the prime factorization of $\displaystyle{k}$, then the sum of all divisors of $k$ is given by the formula $s=(p_1^0+p_1^1+...+p_1^{\alpha_1})(p_2^0+p_2^1+...+p_2^{\alpha_2})\cdot\dots\cdot (p_n^0+p_n^1+...+p_n^{\alpha_n})$.

## Derivation

If you expand the monomial into a polynomial you see that it comes to be the addition of all possible combinations of the multiplication of the prime factors, and so all the divisors.