What are the divisors of 1087?
1, 1087
- There is a total of 2 positive divisors.
- The sum of these divisors is 1088.
- The arithmetic mean is 544.
2 odd divisors
1, 1087
How to compute the divisors of 1087?
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 1087 by each of the numbers from 1 to 1087 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1087 / 1 = 1087 (the remainder is 0, so 1 is a divisor of 1087)
- 1087 / 2 = 543.5 (the remainder is 1, so 2 is not a divisor of 1087)
- 1087 / 3 = 362.33333333333 (the remainder is 1, so 3 is not a divisor of 1087)
- ...
- 1087 / 1086 = 1.0009208103131 (the remainder is 1, so 1086 is not a divisor of 1087)
- 1087 / 1087 = 1 (the remainder is 0, so 1087 is a divisor of 1087)
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 1087 (i.e. 32.969683043669). 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 )
- 1087 / 1 = 1087 (the remainder is 0, so 1 and 1087 are divisors of 1087)
- 1087 / 2 = 543.5 (the remainder is 1, so 2 is not a divisor of 1087)
- 1087 / 3 = 362.33333333333 (the remainder is 1, so 3 is not a divisor of 1087)
- ...
- 1087 / 31 = 35.064516129032 (the remainder is 2, so 31 is not a divisor of 1087)
- 1087 / 32 = 33.96875 (the remainder is 31, so 32 is not a divisor of 1087)