What are the divisors of 474?
1, 2, 3, 6, 79, 158, 237, 474
- There is a total of 8 positive divisors.
- The sum of these divisors is 960.
- The arithmetic mean is 120.
4 even divisors
2, 6, 158, 474
4 odd divisors
1, 3, 79, 237
How to compute the divisors of 474?
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 474 by each of the numbers from 1 to 474 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 474 / 1 = 474 (the remainder is 0, so 1 is a divisor of 474)
- 474 / 2 = 237 (the remainder is 0, so 2 is a divisor of 474)
- 474 / 3 = 158 (the remainder is 0, so 3 is a divisor of 474)
- ...
- 474 / 473 = 1.0021141649049 (the remainder is 1, so 473 is not a divisor of 474)
- 474 / 474 = 1 (the remainder is 0, so 474 is a divisor of 474)
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 474 (i.e. 21.771541057077). 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 )
- 474 / 1 = 474 (the remainder is 0, so 1 and 474 are divisors of 474)
- 474 / 2 = 237 (the remainder is 0, so 2 and 237 are divisors of 474)
- 474 / 3 = 158 (the remainder is 0, so 3 and 158 are divisors of 474)
- ...
- 474 / 20 = 23.7 (the remainder is 14, so 20 is not a divisor of 474)
- 474 / 21 = 22.571428571429 (the remainder is 12, so 21 is not a divisor of 474)