What are the divisors of 5152?
1, 2, 4, 7, 8, 14, 16, 23, 28, 32, 46, 56, 92, 112, 161, 184, 224, 322, 368, 644, 736, 1288, 2576, 5152
- There is a total of 24 positive divisors.
- The sum of these divisors is 12096.
- The arithmetic mean is 504.
20 even divisors
2, 4, 8, 14, 16, 28, 32, 46, 56, 92, 112, 184, 224, 322, 368, 644, 736, 1288, 2576, 5152
4 odd divisors
1, 7, 23, 161
How to compute the divisors of 5152?
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 5152 by each of the numbers from 1 to 5152 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5152 / 1 = 5152 (the remainder is 0, so 1 is a divisor of 5152)
- 5152 / 2 = 2576 (the remainder is 0, so 2 is a divisor of 5152)
- 5152 / 3 = 1717.3333333333 (the remainder is 1, so 3 is not a divisor of 5152)
- ...
- 5152 / 5151 = 1.0001941370608 (the remainder is 1, so 5151 is not a divisor of 5152)
- 5152 / 5152 = 1 (the remainder is 0, so 5152 is a divisor of 5152)
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 5152 (i.e. 71.777433779705). 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 )
- 5152 / 1 = 5152 (the remainder is 0, so 1 and 5152 are divisors of 5152)
- 5152 / 2 = 2576 (the remainder is 0, so 2 and 2576 are divisors of 5152)
- 5152 / 3 = 1717.3333333333 (the remainder is 1, so 3 is not a divisor of 5152)
- ...
- 5152 / 70 = 73.6 (the remainder is 42, so 70 is not a divisor of 5152)
- 5152 / 71 = 72.56338028169 (the remainder is 40, so 71 is not a divisor of 5152)