What are the divisors of 5028?
1, 2, 3, 4, 6, 12, 419, 838, 1257, 1676, 2514, 5028
- There is a total of 12 positive divisors.
- The sum of these divisors is 11760.
- The arithmetic mean is 980.
8 even divisors
2, 4, 6, 12, 838, 1676, 2514, 5028
4 odd divisors
1, 3, 419, 1257
How to compute the divisors of 5028?
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 5028 by each of the numbers from 1 to 5028 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5028 / 1 = 5028 (the remainder is 0, so 1 is a divisor of 5028)
- 5028 / 2 = 2514 (the remainder is 0, so 2 is a divisor of 5028)
- 5028 / 3 = 1676 (the remainder is 0, so 3 is a divisor of 5028)
- ...
- 5028 / 5027 = 1.0001989258007 (the remainder is 1, so 5027 is not a divisor of 5028)
- 5028 / 5028 = 1 (the remainder is 0, so 5028 is a divisor of 5028)
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 5028 (i.e. 70.908391604943). 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 )
- 5028 / 1 = 5028 (the remainder is 0, so 1 and 5028 are divisors of 5028)
- 5028 / 2 = 2514 (the remainder is 0, so 2 and 2514 are divisors of 5028)
- 5028 / 3 = 1676 (the remainder is 0, so 3 and 1676 are divisors of 5028)
- ...
- 5028 / 69 = 72.869565217391 (the remainder is 60, so 69 is not a divisor of 5028)
- 5028 / 70 = 71.828571428571 (the remainder is 58, so 70 is not a divisor of 5028)