What are the divisors of 852?
1, 2, 3, 4, 6, 12, 71, 142, 213, 284, 426, 852
- There is a total of 12 positive divisors.
- The sum of these divisors is 2016.
- The arithmetic mean is 168.
8 even divisors
2, 4, 6, 12, 142, 284, 426, 852
4 odd divisors
1, 3, 71, 213
How to compute the divisors of 852?
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 852 by each of the numbers from 1 to 852 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 852 / 1 = 852 (the remainder is 0, so 1 is a divisor of 852)
- 852 / 2 = 426 (the remainder is 0, so 2 is a divisor of 852)
- 852 / 3 = 284 (the remainder is 0, so 3 is a divisor of 852)
- ...
- 852 / 851 = 1.0011750881316 (the remainder is 1, so 851 is not a divisor of 852)
- 852 / 852 = 1 (the remainder is 0, so 852 is a divisor of 852)
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 852 (i.e. 29.189039038653). 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 )
- 852 / 1 = 852 (the remainder is 0, so 1 and 852 are divisors of 852)
- 852 / 2 = 426 (the remainder is 0, so 2 and 426 are divisors of 852)
- 852 / 3 = 284 (the remainder is 0, so 3 and 284 are divisors of 852)
- ...
- 852 / 28 = 30.428571428571 (the remainder is 12, so 28 is not a divisor of 852)
- 852 / 29 = 29.379310344828 (the remainder is 11, so 29 is not a divisor of 852)