What are the divisors of 114?
1, 2, 3, 6, 19, 38, 57, 114
- There is a total of 8 positive divisors.
- The sum of these divisors is 240.
- The arithmetic mean is 30.
4 even divisors
2, 6, 38, 114
4 odd divisors
1, 3, 19, 57
How to compute the divisors of 114?
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 114 by each of the numbers from 1 to 114 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 114 / 1 = 114 (the remainder is 0, so 1 is a divisor of 114)
- 114 / 2 = 57 (the remainder is 0, so 2 is a divisor of 114)
- 114 / 3 = 38 (the remainder is 0, so 3 is a divisor of 114)
- ...
- 114 / 113 = 1.0088495575221 (the remainder is 1, so 113 is not a divisor of 114)
- 114 / 114 = 1 (the remainder is 0, so 114 is a divisor of 114)
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 114 (i.e. 10.677078252031). 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 )
- 114 / 1 = 114 (the remainder is 0, so 1 and 114 are divisors of 114)
- 114 / 2 = 57 (the remainder is 0, so 2 and 57 are divisors of 114)
- 114 / 3 = 38 (the remainder is 0, so 3 and 38 are divisors of 114)
- ...
- 114 / 9 = 12.666666666667 (the remainder is 6, so 9 is not a divisor of 114)
- 114 / 10 = 11.4 (the remainder is 4, so 10 is not a divisor of 114)