What are the divisors of 560?
1, 2, 4, 5, 7, 8, 10, 14, 16, 20, 28, 35, 40, 56, 70, 80, 112, 140, 280, 560
- There is a total of 20 positive divisors.
- The sum of these divisors is 1488.
- The arithmetic mean is 74.4.
16 even divisors
2, 4, 8, 10, 14, 16, 20, 28, 40, 56, 70, 80, 112, 140, 280, 560
4 odd divisors
1, 5, 7, 35
How to compute the divisors of 560?
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 560 by each of the numbers from 1 to 560 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 560 / 1 = 560 (the remainder is 0, so 1 is a divisor of 560)
- 560 / 2 = 280 (the remainder is 0, so 2 is a divisor of 560)
- 560 / 3 = 186.66666666667 (the remainder is 2, so 3 is not a divisor of 560)
- ...
- 560 / 559 = 1.0017889087657 (the remainder is 1, so 559 is not a divisor of 560)
- 560 / 560 = 1 (the remainder is 0, so 560 is a divisor of 560)
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 560 (i.e. 23.664319132398). 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 )
- 560 / 1 = 560 (the remainder is 0, so 1 and 560 are divisors of 560)
- 560 / 2 = 280 (the remainder is 0, so 2 and 280 are divisors of 560)
- 560 / 3 = 186.66666666667 (the remainder is 2, so 3 is not a divisor of 560)
- ...
- 560 / 22 = 25.454545454545 (the remainder is 10, so 22 is not a divisor of 560)
- 560 / 23 = 24.347826086957 (the remainder is 8, so 23 is not a divisor of 560)