What are the divisors of 5302?
1, 2, 11, 22, 241, 482, 2651, 5302
- There is a total of 8 positive divisors.
- The sum of these divisors is 8712.
- The arithmetic mean is 1089.
4 even divisors
2, 22, 482, 5302
4 odd divisors
1, 11, 241, 2651
How to compute the divisors of 5302?
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 5302 by each of the numbers from 1 to 5302 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5302 / 1 = 5302 (the remainder is 0, so 1 is a divisor of 5302)
- 5302 / 2 = 2651 (the remainder is 0, so 2 is a divisor of 5302)
- 5302 / 3 = 1767.3333333333 (the remainder is 1, so 3 is not a divisor of 5302)
- ...
- 5302 / 5301 = 1.0001886436521 (the remainder is 1, so 5301 is not a divisor of 5302)
- 5302 / 5302 = 1 (the remainder is 0, so 5302 is a divisor of 5302)
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 5302 (i.e. 72.81483365359). 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 )
- 5302 / 1 = 5302 (the remainder is 0, so 1 and 5302 are divisors of 5302)
- 5302 / 2 = 2651 (the remainder is 0, so 2 and 2651 are divisors of 5302)
- 5302 / 3 = 1767.3333333333 (the remainder is 1, so 3 is not a divisor of 5302)
- ...
- 5302 / 71 = 74.676056338028 (the remainder is 48, so 71 is not a divisor of 5302)
- 5302 / 72 = 73.638888888889 (the remainder is 46, so 72 is not a divisor of 5302)