What are the divisors of 5136?
1, 2, 3, 4, 6, 8, 12, 16, 24, 48, 107, 214, 321, 428, 642, 856, 1284, 1712, 2568, 5136
- There is a total of 20 positive divisors.
- The sum of these divisors is 13392.
- The arithmetic mean is 669.6.
16 even divisors
2, 4, 6, 8, 12, 16, 24, 48, 214, 428, 642, 856, 1284, 1712, 2568, 5136
4 odd divisors
1, 3, 107, 321
How to compute the divisors of 5136?
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 5136 by each of the numbers from 1 to 5136 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5136 / 1 = 5136 (the remainder is 0, so 1 is a divisor of 5136)
- 5136 / 2 = 2568 (the remainder is 0, so 2 is a divisor of 5136)
- 5136 / 3 = 1712 (the remainder is 0, so 3 is a divisor of 5136)
- ...
- 5136 / 5135 = 1.0001947419669 (the remainder is 1, so 5135 is not a divisor of 5136)
- 5136 / 5136 = 1 (the remainder is 0, so 5136 is a divisor of 5136)
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 5136 (i.e. 71.665891468676). 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 )
- 5136 / 1 = 5136 (the remainder is 0, so 1 and 5136 are divisors of 5136)
- 5136 / 2 = 2568 (the remainder is 0, so 2 and 2568 are divisors of 5136)
- 5136 / 3 = 1712 (the remainder is 0, so 3 and 1712 are divisors of 5136)
- ...
- 5136 / 70 = 73.371428571429 (the remainder is 26, so 70 is not a divisor of 5136)
- 5136 / 71 = 72.338028169014 (the remainder is 24, so 71 is not a divisor of 5136)