What are the divisors of 1564?
1, 2, 4, 17, 23, 34, 46, 68, 92, 391, 782, 1564
- There is a total of 12 positive divisors.
- The sum of these divisors is 3024.
- The arithmetic mean is 252.
8 even divisors
2, 4, 34, 46, 68, 92, 782, 1564
4 odd divisors
1, 17, 23, 391
How to compute the divisors of 1564?
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 1564 by each of the numbers from 1 to 1564 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1564 / 1 = 1564 (the remainder is 0, so 1 is a divisor of 1564)
- 1564 / 2 = 782 (the remainder is 0, so 2 is a divisor of 1564)
- 1564 / 3 = 521.33333333333 (the remainder is 1, so 3 is not a divisor of 1564)
- ...
- 1564 / 1563 = 1.0006397952655 (the remainder is 1, so 1563 is not a divisor of 1564)
- 1564 / 1564 = 1 (the remainder is 0, so 1564 is a divisor of 1564)
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 1564 (i.e. 39.54743986657). 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 )
- 1564 / 1 = 1564 (the remainder is 0, so 1 and 1564 are divisors of 1564)
- 1564 / 2 = 782 (the remainder is 0, so 2 and 782 are divisors of 1564)
- 1564 / 3 = 521.33333333333 (the remainder is 1, so 3 is not a divisor of 1564)
- ...
- 1564 / 38 = 41.157894736842 (the remainder is 6, so 38 is not a divisor of 1564)
- 1564 / 39 = 40.102564102564 (the remainder is 4, so 39 is not a divisor of 1564)