What are the divisors of 496?
1, 2, 4, 8, 16, 31, 62, 124, 248, 496
- There is a total of 10 positive divisors.
- The sum of these divisors is 992.
- The arithmetic mean is 99.2.
8 even divisors
2, 4, 8, 16, 62, 124, 248, 496
2 odd divisors
1, 31
How to compute the divisors of 496?
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 496 by each of the numbers from 1 to 496 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 496 / 1 = 496 (the remainder is 0, so 1 is a divisor of 496)
- 496 / 2 = 248 (the remainder is 0, so 2 is a divisor of 496)
- 496 / 3 = 165.33333333333 (the remainder is 1, so 3 is not a divisor of 496)
- ...
- 496 / 495 = 1.0020202020202 (the remainder is 1, so 495 is not a divisor of 496)
- 496 / 496 = 1 (the remainder is 0, so 496 is a divisor of 496)
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 496 (i.e. 22.27105745132). 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 )
- 496 / 1 = 496 (the remainder is 0, so 1 and 496 are divisors of 496)
- 496 / 2 = 248 (the remainder is 0, so 2 and 248 are divisors of 496)
- 496 / 3 = 165.33333333333 (the remainder is 1, so 3 is not a divisor of 496)
- ...
- 496 / 21 = 23.619047619048 (the remainder is 13, so 21 is not a divisor of 496)
- 496 / 22 = 22.545454545455 (the remainder is 12, so 22 is not a divisor of 496)