What are the divisors of 564?
1, 2, 3, 4, 6, 12, 47, 94, 141, 188, 282, 564
- There is a total of 12 positive divisors.
- The sum of these divisors is 1344.
- The arithmetic mean is 112.
8 even divisors
2, 4, 6, 12, 94, 188, 282, 564
4 odd divisors
1, 3, 47, 141
How to compute the divisors of 564?
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 564 by each of the numbers from 1 to 564 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 564 / 1 = 564 (the remainder is 0, so 1 is a divisor of 564)
- 564 / 2 = 282 (the remainder is 0, so 2 is a divisor of 564)
- 564 / 3 = 188 (the remainder is 0, so 3 is a divisor of 564)
- ...
- 564 / 563 = 1.0017761989343 (the remainder is 1, so 563 is not a divisor of 564)
- 564 / 564 = 1 (the remainder is 0, so 564 is a divisor of 564)
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 564 (i.e. 23.748684174076). 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 )
- 564 / 1 = 564 (the remainder is 0, so 1 and 564 are divisors of 564)
- 564 / 2 = 282 (the remainder is 0, so 2 and 282 are divisors of 564)
- 564 / 3 = 188 (the remainder is 0, so 3 and 188 are divisors of 564)
- ...
- 564 / 22 = 25.636363636364 (the remainder is 14, so 22 is not a divisor of 564)
- 564 / 23 = 24.521739130435 (the remainder is 12, so 23 is not a divisor of 564)