What are the divisors of 5115?
1, 3, 5, 11, 15, 31, 33, 55, 93, 155, 165, 341, 465, 1023, 1705, 5115
- There is a total of 16 positive divisors.
- The sum of these divisors is 9216.
- The arithmetic mean is 576.
16 odd divisors
1, 3, 5, 11, 15, 31, 33, 55, 93, 155, 165, 341, 465, 1023, 1705, 5115
How to compute the divisors of 5115?
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 5115 by each of the numbers from 1 to 5115 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5115 / 1 = 5115 (the remainder is 0, so 1 is a divisor of 5115)
- 5115 / 2 = 2557.5 (the remainder is 1, so 2 is not a divisor of 5115)
- 5115 / 3 = 1705 (the remainder is 0, so 3 is a divisor of 5115)
- ...
- 5115 / 5114 = 1.0001955416504 (the remainder is 1, so 5114 is not a divisor of 5115)
- 5115 / 5115 = 1 (the remainder is 0, so 5115 is a divisor of 5115)
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 5115 (i.e. 71.519228183755). 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 )
- 5115 / 1 = 5115 (the remainder is 0, so 1 and 5115 are divisors of 5115)
- 5115 / 2 = 2557.5 (the remainder is 1, so 2 is not a divisor of 5115)
- 5115 / 3 = 1705 (the remainder is 0, so 3 and 1705 are divisors of 5115)
- ...
- 5115 / 70 = 73.071428571429 (the remainder is 5, so 70 is not a divisor of 5115)
- 5115 / 71 = 72.042253521127 (the remainder is 3, so 71 is not a divisor of 5115)