What are the divisors of 3979?
1, 23, 173, 3979
- There is a total of 4 positive divisors.
- The sum of these divisors is 4176.
- The arithmetic mean is 1044.
4 odd divisors
1, 23, 173, 3979
How to compute the divisors of 3979?
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 3979 by each of the numbers from 1 to 3979 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3979 / 1 = 3979 (the remainder is 0, so 1 is a divisor of 3979)
- 3979 / 2 = 1989.5 (the remainder is 1, so 2 is not a divisor of 3979)
- 3979 / 3 = 1326.3333333333 (the remainder is 1, so 3 is not a divisor of 3979)
- ...
- 3979 / 3978 = 1.0002513826043 (the remainder is 1, so 3978 is not a divisor of 3979)
- 3979 / 3979 = 1 (the remainder is 0, so 3979 is a divisor of 3979)
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 3979 (i.e. 63.079315151641). 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 )
- 3979 / 1 = 3979 (the remainder is 0, so 1 and 3979 are divisors of 3979)
- 3979 / 2 = 1989.5 (the remainder is 1, so 2 is not a divisor of 3979)
- 3979 / 3 = 1326.3333333333 (the remainder is 1, so 3 is not a divisor of 3979)
- ...
- 3979 / 62 = 64.177419354839 (the remainder is 11, so 62 is not a divisor of 3979)
- 3979 / 63 = 63.15873015873 (the remainder is 10, so 63 is not a divisor of 3979)