What are the divisors of 5054?
1, 2, 7, 14, 19, 38, 133, 266, 361, 722, 2527, 5054
- There is a total of 12 positive divisors.
- The sum of these divisors is 9144.
- The arithmetic mean is 762.
6 even divisors
2, 14, 38, 266, 722, 5054
6 odd divisors
1, 7, 19, 133, 361, 2527
How to compute the divisors of 5054?
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 5054 by each of the numbers from 1 to 5054 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5054 / 1 = 5054 (the remainder is 0, so 1 is a divisor of 5054)
- 5054 / 2 = 2527 (the remainder is 0, so 2 is a divisor of 5054)
- 5054 / 3 = 1684.6666666667 (the remainder is 2, so 3 is not a divisor of 5054)
- ...
- 5054 / 5053 = 1.0001979022363 (the remainder is 1, so 5053 is not a divisor of 5054)
- 5054 / 5054 = 1 (the remainder is 0, so 5054 is a divisor of 5054)
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 5054 (i.e. 71.091490348705). 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 )
- 5054 / 1 = 5054 (the remainder is 0, so 1 and 5054 are divisors of 5054)
- 5054 / 2 = 2527 (the remainder is 0, so 2 and 2527 are divisors of 5054)
- 5054 / 3 = 1684.6666666667 (the remainder is 2, so 3 is not a divisor of 5054)
- ...
- 5054 / 70 = 72.2 (the remainder is 14, so 70 is not a divisor of 5054)
- 5054 / 71 = 71.183098591549 (the remainder is 13, so 71 is not a divisor of 5054)