What are the divisors of 3116?
1, 2, 4, 19, 38, 41, 76, 82, 164, 779, 1558, 3116
- There is a total of 12 positive divisors.
- The sum of these divisors is 5880.
- The arithmetic mean is 490.
8 even divisors
2, 4, 38, 76, 82, 164, 1558, 3116
4 odd divisors
1, 19, 41, 779
How to compute the divisors of 3116?
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 3116 by each of the numbers from 1 to 3116 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3116 / 1 = 3116 (the remainder is 0, so 1 is a divisor of 3116)
- 3116 / 2 = 1558 (the remainder is 0, so 2 is a divisor of 3116)
- 3116 / 3 = 1038.6666666667 (the remainder is 2, so 3 is not a divisor of 3116)
- ...
- 3116 / 3115 = 1.0003210272873 (the remainder is 1, so 3115 is not a divisor of 3116)
- 3116 / 3116 = 1 (the remainder is 0, so 3116 is a divisor of 3116)
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 3116 (i.e. 55.821142947811). 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 )
- 3116 / 1 = 3116 (the remainder is 0, so 1 and 3116 are divisors of 3116)
- 3116 / 2 = 1558 (the remainder is 0, so 2 and 1558 are divisors of 3116)
- 3116 / 3 = 1038.6666666667 (the remainder is 2, so 3 is not a divisor of 3116)
- ...
- 3116 / 54 = 57.703703703704 (the remainder is 38, so 54 is not a divisor of 3116)
- 3116 / 55 = 56.654545454545 (the remainder is 36, so 55 is not a divisor of 3116)