Explain the origin of the number of divisors and sum of divisors formulas.

121 Views Asked by At

I know the basic formulas which are:

For a number $n = p_1^{a_1} p_2^{a_2} \cdot \ldots \cdot p_k^{a_k}$, we have $d(n) = ( a_1 + 1 )( a_2 + 1 ) \cdot \ldots \cdot (a_k+1)$ and $S(n) = \frac{p_1^{a_1+1} - 1}{p_1-1} \cdot \frac{p_2^{a_2+1} - 1}{p_2-1} \cdot \ldots \cdot \frac{p_k^{a_k+1} - 1}{p_k-1}$

I found some demonstrations but none close to my level of maths understanding.I want a simple description of how those formulas were found. Basically, explain everything.

2

There are 2 best solutions below

0
On BEST ANSWER

I'll write about $d(n)$, but this reasoning can probably be extended to $S(n)$.

Every divisor of $n$ will be of the form $p_1^{b_1}\cdots p_k^{b_k}$, where $0 \leqslant b_i \leqslant a_i$. Each choice of $b$ gives a divisor, and vice versa. Every $b_i$ is independent, and has a range of $a_i + 1$ possible values, hence $d(n) = \Pi_{i=1}^k (a_i+1)$.

0
On

Note that $\frac{x^{n+1}-1}{ x - 1} = x^n + x^{n-1} + \dots + x + 1$. Also note that $(a_1 + \dots + a_n) \cdot (b_1 + \dots + b_m)$ is the sum of all possible combinations of $a_ib_j$. From this you should be able to figure out $S(n)$.

Note that, in the expression of $S(n)$, if instead of the divisors we could have $1$s, that would be $d(n)$. We can make them $1$ if instead of $p_i^{a_i} + \dots + p_i + 1$ you'd have $1^{a_i} + \dots + 1 + 1 = a_i+1$. Thus $d(n)$ can be explained in terms of $S(n)$.