What are the divisors of 1674?
1, 2, 3, 6, 9, 18, 27, 31, 54, 62, 93, 186, 279, 558, 837, 1674
- There is a total of 16 positive divisors.
- The sum of these divisors is 3840.
- The arithmetic mean is 240.
8 even divisors
2, 6, 18, 54, 62, 186, 558, 1674
8 odd divisors
1, 3, 9, 27, 31, 93, 279, 837
How to compute the divisors of 1674?
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 1674 by each of the numbers from 1 to 1674 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1674 / 1 = 1674 (the remainder is 0, so 1 is a divisor of 1674)
- 1674 / 2 = 837 (the remainder is 0, so 2 is a divisor of 1674)
- 1674 / 3 = 558 (the remainder is 0, so 3 is a divisor of 1674)
- ...
- 1674 / 1673 = 1.0005977286312 (the remainder is 1, so 1673 is not a divisor of 1674)
- 1674 / 1674 = 1 (the remainder is 0, so 1674 is a divisor of 1674)
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 1674 (i.e. 40.914545090958). 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 )
- 1674 / 1 = 1674 (the remainder is 0, so 1 and 1674 are divisors of 1674)
- 1674 / 2 = 837 (the remainder is 0, so 2 and 837 are divisors of 1674)
- 1674 / 3 = 558 (the remainder is 0, so 3 and 558 are divisors of 1674)
- ...
- 1674 / 39 = 42.923076923077 (the remainder is 36, so 39 is not a divisor of 1674)
- 1674 / 40 = 41.85 (the remainder is 34, so 40 is not a divisor of 1674)