What are the divisors of 232?
1, 2, 4, 8, 29, 58, 116, 232
- There is a total of 8 positive divisors.
- The sum of these divisors is 450.
- The arithmetic mean is 56.25.
6 even divisors
2, 4, 8, 58, 116, 232
2 odd divisors
1, 29
How to compute the divisors of 232?
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 232 by each of the numbers from 1 to 232 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 232 / 1 = 232 (the remainder is 0, so 1 is a divisor of 232)
- 232 / 2 = 116 (the remainder is 0, so 2 is a divisor of 232)
- 232 / 3 = 77.333333333333 (the remainder is 1, so 3 is not a divisor of 232)
- ...
- 232 / 231 = 1.004329004329 (the remainder is 1, so 231 is not a divisor of 232)
- 232 / 232 = 1 (the remainder is 0, so 232 is a divisor of 232)
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 232 (i.e. 15.231546211728). 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 )
- 232 / 1 = 232 (the remainder is 0, so 1 and 232 are divisors of 232)
- 232 / 2 = 116 (the remainder is 0, so 2 and 116 are divisors of 232)
- 232 / 3 = 77.333333333333 (the remainder is 1, so 3 is not a divisor of 232)
- ...
- 232 / 14 = 16.571428571429 (the remainder is 8, so 14 is not a divisor of 232)
- 232 / 15 = 15.466666666667 (the remainder is 7, so 15 is not a divisor of 232)