What are the divisors of 1834?
1, 2, 7, 14, 131, 262, 917, 1834
- There is a total of 8 positive divisors.
- The sum of these divisors is 3168.
- The arithmetic mean is 396.
4 even divisors
2, 14, 262, 1834
4 odd divisors
1, 7, 131, 917
How to compute the divisors of 1834?
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 1834 by each of the numbers from 1 to 1834 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1834 / 1 = 1834 (the remainder is 0, so 1 is a divisor of 1834)
- 1834 / 2 = 917 (the remainder is 0, so 2 is a divisor of 1834)
- 1834 / 3 = 611.33333333333 (the remainder is 1, so 3 is not a divisor of 1834)
- ...
- 1834 / 1833 = 1.000545553737 (the remainder is 1, so 1833 is not a divisor of 1834)
- 1834 / 1834 = 1 (the remainder is 0, so 1834 is a divisor of 1834)
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 1834 (i.e. 42.825226210728). 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 )
- 1834 / 1 = 1834 (the remainder is 0, so 1 and 1834 are divisors of 1834)
- 1834 / 2 = 917 (the remainder is 0, so 2 and 917 are divisors of 1834)
- 1834 / 3 = 611.33333333333 (the remainder is 1, so 3 is not a divisor of 1834)
- ...
- 1834 / 41 = 44.731707317073 (the remainder is 30, so 41 is not a divisor of 1834)
- 1834 / 42 = 43.666666666667 (the remainder is 28, so 42 is not a divisor of 1834)