What are the divisors of 816?
1, 2, 3, 4, 6, 8, 12, 16, 17, 24, 34, 48, 51, 68, 102, 136, 204, 272, 408, 816
- There is a total of 20 positive divisors.
- The sum of these divisors is 2232.
- The arithmetic mean is 111.6.
16 even divisors
2, 4, 6, 8, 12, 16, 24, 34, 48, 68, 102, 136, 204, 272, 408, 816
4 odd divisors
1, 3, 17, 51
How to compute the divisors of 816?
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 816 by each of the numbers from 1 to 816 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 816 / 1 = 816 (the remainder is 0, so 1 is a divisor of 816)
- 816 / 2 = 408 (the remainder is 0, so 2 is a divisor of 816)
- 816 / 3 = 272 (the remainder is 0, so 3 is a divisor of 816)
- ...
- 816 / 815 = 1.001226993865 (the remainder is 1, so 815 is not a divisor of 816)
- 816 / 816 = 1 (the remainder is 0, so 816 is a divisor of 816)
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 816 (i.e. 28.565713714171). 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 )
- 816 / 1 = 816 (the remainder is 0, so 1 and 816 are divisors of 816)
- 816 / 2 = 408 (the remainder is 0, so 2 and 408 are divisors of 816)
- 816 / 3 = 272 (the remainder is 0, so 3 and 272 are divisors of 816)
- ...
- 816 / 27 = 30.222222222222 (the remainder is 6, so 27 is not a divisor of 816)
- 816 / 28 = 29.142857142857 (the remainder is 4, so 28 is not a divisor of 816)