What are the divisors of 532?
1, 2, 4, 7, 14, 19, 28, 38, 76, 133, 266, 532
- There is a total of 12 positive divisors.
- The sum of these divisors is 1120.
- The arithmetic mean is 93.333333333333.
8 even divisors
2, 4, 14, 28, 38, 76, 266, 532
4 odd divisors
1, 7, 19, 133
How to compute the divisors of 532?
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 532 by each of the numbers from 1 to 532 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 532 / 1 = 532 (the remainder is 0, so 1 is a divisor of 532)
- 532 / 2 = 266 (the remainder is 0, so 2 is a divisor of 532)
- 532 / 3 = 177.33333333333 (the remainder is 1, so 3 is not a divisor of 532)
- ...
- 532 / 531 = 1.0018832391714 (the remainder is 1, so 531 is not a divisor of 532)
- 532 / 532 = 1 (the remainder is 0, so 532 is a divisor of 532)
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 532 (i.e. 23.065125189342). 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 )
- 532 / 1 = 532 (the remainder is 0, so 1 and 532 are divisors of 532)
- 532 / 2 = 266 (the remainder is 0, so 2 and 266 are divisors of 532)
- 532 / 3 = 177.33333333333 (the remainder is 1, so 3 is not a divisor of 532)
- ...
- 532 / 22 = 24.181818181818 (the remainder is 4, so 22 is not a divisor of 532)
- 532 / 23 = 23.130434782609 (the remainder is 3, so 23 is not a divisor of 532)