What are the divisors of 2079?
1, 3, 7, 9, 11, 21, 27, 33, 63, 77, 99, 189, 231, 297, 693, 2079
- There is a total of 16 positive divisors.
- The sum of these divisors is 3840.
- The arithmetic mean is 240.
16 odd divisors
1, 3, 7, 9, 11, 21, 27, 33, 63, 77, 99, 189, 231, 297, 693, 2079
How to compute the divisors of 2079?
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 2079 by each of the numbers from 1 to 2079 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2079 / 1 = 2079 (the remainder is 0, so 1 is a divisor of 2079)
- 2079 / 2 = 1039.5 (the remainder is 1, so 2 is not a divisor of 2079)
- 2079 / 3 = 693 (the remainder is 0, so 3 is a divisor of 2079)
- ...
- 2079 / 2078 = 1.0004812319538 (the remainder is 1, so 2078 is not a divisor of 2079)
- 2079 / 2079 = 1 (the remainder is 0, so 2079 is a divisor of 2079)
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 2079 (i.e. 45.596052460712). 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 )
- 2079 / 1 = 2079 (the remainder is 0, so 1 and 2079 are divisors of 2079)
- 2079 / 2 = 1039.5 (the remainder is 1, so 2 is not a divisor of 2079)
- 2079 / 3 = 693 (the remainder is 0, so 3 and 693 are divisors of 2079)
- ...
- 2079 / 44 = 47.25 (the remainder is 11, so 44 is not a divisor of 2079)
- 2079 / 45 = 46.2 (the remainder is 9, so 45 is not a divisor of 2079)