What are the divisors of 888?
1, 2, 3, 4, 6, 8, 12, 24, 37, 74, 111, 148, 222, 296, 444, 888
- There is a total of 16 positive divisors.
- The sum of these divisors is 2280.
- The arithmetic mean is 142.5.
12 even divisors
2, 4, 6, 8, 12, 24, 74, 148, 222, 296, 444, 888
4 odd divisors
1, 3, 37, 111
How to compute the divisors of 888?
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 888 by each of the numbers from 1 to 888 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 888 / 1 = 888 (the remainder is 0, so 1 is a divisor of 888)
- 888 / 2 = 444 (the remainder is 0, so 2 is a divisor of 888)
- 888 / 3 = 296 (the remainder is 0, so 3 is a divisor of 888)
- ...
- 888 / 887 = 1.0011273957159 (the remainder is 1, so 887 is not a divisor of 888)
- 888 / 888 = 1 (the remainder is 0, so 888 is a divisor of 888)
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 888 (i.e. 29.799328851503). 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 )
- 888 / 1 = 888 (the remainder is 0, so 1 and 888 are divisors of 888)
- 888 / 2 = 444 (the remainder is 0, so 2 and 444 are divisors of 888)
- 888 / 3 = 296 (the remainder is 0, so 3 and 296 are divisors of 888)
- ...
- 888 / 28 = 31.714285714286 (the remainder is 20, so 28 is not a divisor of 888)
- 888 / 29 = 30.620689655172 (the remainder is 18, so 29 is not a divisor of 888)