What are the divisors of 3951?
1, 3, 9, 439, 1317, 3951
- There is a total of 6 positive divisors.
- The sum of these divisors is 5720.
- The arithmetic mean is 953.33333333333.
6 odd divisors
1, 3, 9, 439, 1317, 3951
How to compute the divisors of 3951?
A number N is said to be divisible by a number M (with M non-zero) if, when we divide N by M, the remainder of the division is zero.
Brute force algorithm
We could start by using a brute-force method which would involve dividing 3951 by each of the numbers from 1 to 3951 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3951 / 1 = 3951 (the remainder is 0, so 1 is a divisor of 3951)
- 3951 / 2 = 1975.5 (the remainder is 1, so 2 is not a divisor of 3951)
- 3951 / 3 = 1317 (the remainder is 0, so 3 is a divisor of 3951)
- ...
- 3951 / 3950 = 1.000253164557 (the remainder is 1, so 3950 is not a divisor of 3951)
- 3951 / 3951 = 1 (the remainder is 0, so 3951 is a divisor of 3951)
Improved algorithm using square-root
However, there is another slightly better approach that reduces the number of iterations by testing only integers less than or equal to the square root of 3951 (i.e. 62.856980519271). Indeed, if a number N has a divisor D greater than its square root, then there is necessarily a smaller divisor d such that:
(thus, if , then )
- 3951 / 1 = 3951 (the remainder is 0, so 1 and 3951 are divisors of 3951)
- 3951 / 2 = 1975.5 (the remainder is 1, so 2 is not a divisor of 3951)
- 3951 / 3 = 1317 (the remainder is 0, so 3 and 1317 are divisors of 3951)
- ...
- 3951 / 61 = 64.770491803279 (the remainder is 47, so 61 is not a divisor of 3951)
- 3951 / 62 = 63.725806451613 (the remainder is 45, so 62 is not a divisor of 3951)