What are the divisors of 936?
1, 2, 3, 4, 6, 8, 9, 12, 13, 18, 24, 26, 36, 39, 52, 72, 78, 104, 117, 156, 234, 312, 468, 936
- There is a total of 24 positive divisors.
- The sum of these divisors is 2730.
- The arithmetic mean is 113.75.
18 even divisors
2, 4, 6, 8, 12, 18, 24, 26, 36, 52, 72, 78, 104, 156, 234, 312, 468, 936
6 odd divisors
1, 3, 9, 13, 39, 117
How to compute the divisors of 936?
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 936 by each of the numbers from 1 to 936 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 936 / 1 = 936 (the remainder is 0, so 1 is a divisor of 936)
- 936 / 2 = 468 (the remainder is 0, so 2 is a divisor of 936)
- 936 / 3 = 312 (the remainder is 0, so 3 is a divisor of 936)
- ...
- 936 / 935 = 1.0010695187166 (the remainder is 1, so 935 is not a divisor of 936)
- 936 / 936 = 1 (the remainder is 0, so 936 is a divisor of 936)
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 936 (i.e. 30.594117081557). 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 )
- 936 / 1 = 936 (the remainder is 0, so 1 and 936 are divisors of 936)
- 936 / 2 = 468 (the remainder is 0, so 2 and 468 are divisors of 936)
- 936 / 3 = 312 (the remainder is 0, so 3 and 312 are divisors of 936)
- ...
- 936 / 29 = 32.275862068966 (the remainder is 8, so 29 is not a divisor of 936)
- 936 / 30 = 31.2 (the remainder is 6, so 30 is not a divisor of 936)