What are the divisors of 296?
1, 2, 4, 8, 37, 74, 148, 296
- There is a total of 8 positive divisors.
- The sum of these divisors is 570.
- The arithmetic mean is 71.25.
6 even divisors
2, 4, 8, 74, 148, 296
2 odd divisors
1, 37
How to compute the divisors of 296?
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 296 by each of the numbers from 1 to 296 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 296 / 1 = 296 (the remainder is 0, so 1 is a divisor of 296)
- 296 / 2 = 148 (the remainder is 0, so 2 is a divisor of 296)
- 296 / 3 = 98.666666666667 (the remainder is 2, so 3 is not a divisor of 296)
- ...
- 296 / 295 = 1.0033898305085 (the remainder is 1, so 295 is not a divisor of 296)
- 296 / 296 = 1 (the remainder is 0, so 296 is a divisor of 296)
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 296 (i.e. 17.204650534085). 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 )
- 296 / 1 = 296 (the remainder is 0, so 1 and 296 are divisors of 296)
- 296 / 2 = 148 (the remainder is 0, so 2 and 148 are divisors of 296)
- 296 / 3 = 98.666666666667 (the remainder is 2, so 3 is not a divisor of 296)
- ...
- 296 / 16 = 18.5 (the remainder is 8, so 16 is not a divisor of 296)
- 296 / 17 = 17.411764705882 (the remainder is 7, so 17 is not a divisor of 296)