What are the divisors of 902?
1, 2, 11, 22, 41, 82, 451, 902
- There is a total of 8 positive divisors.
- The sum of these divisors is 1512.
- The arithmetic mean is 189.
4 even divisors
2, 22, 82, 902
4 odd divisors
1, 11, 41, 451
How to compute the divisors of 902?
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 902 by each of the numbers from 1 to 902 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 902 / 1 = 902 (the remainder is 0, so 1 is a divisor of 902)
- 902 / 2 = 451 (the remainder is 0, so 2 is a divisor of 902)
- 902 / 3 = 300.66666666667 (the remainder is 2, so 3 is not a divisor of 902)
- ...
- 902 / 901 = 1.0011098779134 (the remainder is 1, so 901 is not a divisor of 902)
- 902 / 902 = 1 (the remainder is 0, so 902 is a divisor of 902)
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 902 (i.e. 30.033314835362). 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 )
- 902 / 1 = 902 (the remainder is 0, so 1 and 902 are divisors of 902)
- 902 / 2 = 451 (the remainder is 0, so 2 and 451 are divisors of 902)
- 902 / 3 = 300.66666666667 (the remainder is 2, so 3 is not a divisor of 902)
- ...
- 902 / 29 = 31.103448275862 (the remainder is 3, so 29 is not a divisor of 902)
- 902 / 30 = 30.066666666667 (the remainder is 2, so 30 is not a divisor of 902)