What are the divisors of 1835?
1, 5, 367, 1835
- There is a total of 4 positive divisors.
- The sum of these divisors is 2208.
- The arithmetic mean is 552.
4 odd divisors
1, 5, 367, 1835
How to compute the divisors of 1835?
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 1835 by each of the numbers from 1 to 1835 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1835 / 1 = 1835 (the remainder is 0, so 1 is a divisor of 1835)
- 1835 / 2 = 917.5 (the remainder is 1, so 2 is not a divisor of 1835)
- 1835 / 3 = 611.66666666667 (the remainder is 2, so 3 is not a divisor of 1835)
- ...
- 1835 / 1834 = 1.0005452562704 (the remainder is 1, so 1834 is not a divisor of 1835)
- 1835 / 1835 = 1 (the remainder is 0, so 1835 is a divisor of 1835)
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 1835 (i.e. 42.836899981208). 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 )
- 1835 / 1 = 1835 (the remainder is 0, so 1 and 1835 are divisors of 1835)
- 1835 / 2 = 917.5 (the remainder is 1, so 2 is not a divisor of 1835)
- 1835 / 3 = 611.66666666667 (the remainder is 2, so 3 is not a divisor of 1835)
- ...
- 1835 / 41 = 44.756097560976 (the remainder is 31, so 41 is not a divisor of 1835)
- 1835 / 42 = 43.690476190476 (the remainder is 29, so 42 is not a divisor of 1835)