What are the divisors of 2028?
1, 2, 3, 4, 6, 12, 13, 26, 39, 52, 78, 156, 169, 338, 507, 676, 1014, 2028
- There is a total of 18 positive divisors.
- The sum of these divisors is 5124.
- The arithmetic mean is 284.66666666667.
12 even divisors
2, 4, 6, 12, 26, 52, 78, 156, 338, 676, 1014, 2028
6 odd divisors
1, 3, 13, 39, 169, 507
How to compute the divisors of 2028?
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 2028 by each of the numbers from 1 to 2028 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2028 / 1 = 2028 (the remainder is 0, so 1 is a divisor of 2028)
- 2028 / 2 = 1014 (the remainder is 0, so 2 is a divisor of 2028)
- 2028 / 3 = 676 (the remainder is 0, so 3 is a divisor of 2028)
- ...
- 2028 / 2027 = 1.0004933399112 (the remainder is 1, so 2027 is not a divisor of 2028)
- 2028 / 2028 = 1 (the remainder is 0, so 2028 is a divisor of 2028)
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 2028 (i.e. 45.033320996791). 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 )
- 2028 / 1 = 2028 (the remainder is 0, so 1 and 2028 are divisors of 2028)
- 2028 / 2 = 1014 (the remainder is 0, so 2 and 1014 are divisors of 2028)
- 2028 / 3 = 676 (the remainder is 0, so 3 and 676 are divisors of 2028)
- ...
- 2028 / 44 = 46.090909090909 (the remainder is 4, so 44 is not a divisor of 2028)
- 2028 / 45 = 45.066666666667 (the remainder is 3, so 45 is not a divisor of 2028)