Divisors Calculator

This calculator calculates the divisor of an input number, the number of divisors, and the sum of the divisors.

How to Use


What are divisors?

An integer that is divisible by an integer \(N\) is called the divisor of \(N\).

As an example, consider the divisor of 6.

When 6 is divided by 2, 2 is the divisor of 6 because it is divisible by 2.

When 6 is divided by 4, there is a remainder of 2, so 4 is not a divisor of 6.

In this way, we can determine whether a given number is an integral or not by actually dividing it by an integer less than or equal to that number.

In the same way, by considering all integers less than or equal to 6 in the same way, we can see that the divisors of 6 are 1, 2, 3, and 6.


How to find the number and sum of divisors

The number of divisors and the sum of the divisors can be found by using prime factorization.

Suppose that a given integer \(N\) can be prime factorized as follows.

\[ N=p_{1}^{n_{1}}\times p_{2}^{n_{2}}\cdots p_{m}^{n_{m}} \]

The number of divisors can then be calculated as follows

\[ \left(n_{1}+1\right)\times\left(n_{2}+1\right)\times\cdots\times\left(n_{m}+1\right) \]

In addition, the sum of the divisors can be calculated as follows

\[ \left(\sum_{i=0}^{n_{1}}{p_{1}}^{i}\right)\times\left(\sum_{i=0}^{n_{2}}{p_{2}}^{i}\right)\times\cdots\times\left(\sum_{i=0}^{n_{m}}{p_{m}}^{i}\right) \]

As an example, we find the number and sum of the divisors of 12.

First, prime factorize 12.

\[ 12=2^{2}\times3 \]

The number of divisors of 12 is found as follows

\[ \left(2+1\right)\times\left(1+1\right)=6 \]

The sum of the 12 divisors is found as follows

\[ \left(2^{0}+2^{1}+2^{2}\right)\times\left(3^{0}+3^{1}\right)=28 \]


Example

Example 1

Find the number and sum of 18 divisors.

Solution

Prime factorizing 18 yields the following

\[ 18=2\times3^{2} \]

The number of divisors of 18 is obtained as follows.

\[ \left(1+1\right)\times\left(2+1\right)=6 \]

The sum of 18 divisors is obtained as follows.

\[ \left(2^{0}+2^{1}\right)\times\left(3^{0}+3^{1}+3^{2}\right)=13 \]


Example 2

Find the number and sum of 100 divisors.

Solution

Prime factorizing 100 yields the following

\[ 100=2^{2}\times5^{2} \]

The number of divisors of 18 is obtained as follows.

\[ \left(2+1\right)\times\left(2+1\right)=9 \]

The sum of 18 divisors is obtained as follows.

\[ \left(2^{0}+2^{1}+2^{2}\right)\times\left(5^{0}+5^{1}+5^{2}\right)=217 \]