What are the divisors of 5032?
1, 2, 4, 8, 17, 34, 37, 68, 74, 136, 148, 296, 629, 1258, 2516, 5032
- There is a total of 16 positive divisors.
- The sum of these divisors is 10260.
- The arithmetic mean is 641.25.
12 even divisors
2, 4, 8, 34, 68, 74, 136, 148, 296, 1258, 2516, 5032
4 odd divisors
1, 17, 37, 629
How to compute the divisors of 5032?
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 5032 by each of the numbers from 1 to 5032 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5032 / 1 = 5032 (the remainder is 0, so 1 is a divisor of 5032)
- 5032 / 2 = 2516 (the remainder is 0, so 2 is a divisor of 5032)
- 5032 / 3 = 1677.3333333333 (the remainder is 1, so 3 is not a divisor of 5032)
- ...
- 5032 / 5031 = 1.0001987676406 (the remainder is 1, so 5031 is not a divisor of 5032)
- 5032 / 5032 = 1 (the remainder is 0, so 5032 is a divisor of 5032)
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 5032 (i.e. 70.936591403873). 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 )
- 5032 / 1 = 5032 (the remainder is 0, so 1 and 5032 are divisors of 5032)
- 5032 / 2 = 2516 (the remainder is 0, so 2 and 2516 are divisors of 5032)
- 5032 / 3 = 1677.3333333333 (the remainder is 1, so 3 is not a divisor of 5032)
- ...
- 5032 / 69 = 72.927536231884 (the remainder is 64, so 69 is not a divisor of 5032)
- 5032 / 70 = 71.885714285714 (the remainder is 62, so 70 is not a divisor of 5032)