What are the divisors of 4228?
1, 2, 4, 7, 14, 28, 151, 302, 604, 1057, 2114, 4228
- There is a total of 12 positive divisors.
- The sum of these divisors is 8512.
- The arithmetic mean is 709.33333333333.
8 even divisors
2, 4, 14, 28, 302, 604, 2114, 4228
4 odd divisors
1, 7, 151, 1057
How to compute the divisors of 4228?
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 4228 by each of the numbers from 1 to 4228 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4228 / 1 = 4228 (the remainder is 0, so 1 is a divisor of 4228)
- 4228 / 2 = 2114 (the remainder is 0, so 2 is a divisor of 4228)
- 4228 / 3 = 1409.3333333333 (the remainder is 1, so 3 is not a divisor of 4228)
- ...
- 4228 / 4227 = 1.0002365744026 (the remainder is 1, so 4227 is not a divisor of 4228)
- 4228 / 4228 = 1 (the remainder is 0, so 4228 is a divisor of 4228)
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 4228 (i.e. 65.023072828035). 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 )
- 4228 / 1 = 4228 (the remainder is 0, so 1 and 4228 are divisors of 4228)
- 4228 / 2 = 2114 (the remainder is 0, so 2 and 2114 are divisors of 4228)
- 4228 / 3 = 1409.3333333333 (the remainder is 1, so 3 is not a divisor of 4228)
- ...
- 4228 / 64 = 66.0625 (the remainder is 4, so 64 is not a divisor of 4228)
- 4228 / 65 = 65.046153846154 (the remainder is 3, so 65 is not a divisor of 4228)