What are the divisors of 580?
1, 2, 4, 5, 10, 20, 29, 58, 116, 145, 290, 580
- There is a total of 12 positive divisors.
- The sum of these divisors is 1260.
- The arithmetic mean is 105.
8 even divisors
2, 4, 10, 20, 58, 116, 290, 580
4 odd divisors
1, 5, 29, 145
How to compute the divisors of 580?
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 580 by each of the numbers from 1 to 580 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 580 / 1 = 580 (the remainder is 0, so 1 is a divisor of 580)
- 580 / 2 = 290 (the remainder is 0, so 2 is a divisor of 580)
- 580 / 3 = 193.33333333333 (the remainder is 1, so 3 is not a divisor of 580)
- ...
- 580 / 579 = 1.0017271157168 (the remainder is 1, so 579 is not a divisor of 580)
- 580 / 580 = 1 (the remainder is 0, so 580 is a divisor of 580)
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 580 (i.e. 24.083189157585). 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 )
- 580 / 1 = 580 (the remainder is 0, so 1 and 580 are divisors of 580)
- 580 / 2 = 290 (the remainder is 0, so 2 and 290 are divisors of 580)
- 580 / 3 = 193.33333333333 (the remainder is 1, so 3 is not a divisor of 580)
- ...
- 580 / 23 = 25.217391304348 (the remainder is 5, so 23 is not a divisor of 580)
- 580 / 24 = 24.166666666667 (the remainder is 4, so 24 is not a divisor of 580)