What are the divisors of 3087?
1, 3, 7, 9, 21, 49, 63, 147, 343, 441, 1029, 3087
- There is a total of 12 positive divisors.
- The sum of these divisors is 5200.
- The arithmetic mean is 433.33333333333.
12 odd divisors
1, 3, 7, 9, 21, 49, 63, 147, 343, 441, 1029, 3087
How to compute the divisors of 3087?
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 3087 by each of the numbers from 1 to 3087 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3087 / 1 = 3087 (the remainder is 0, so 1 is a divisor of 3087)
- 3087 / 2 = 1543.5 (the remainder is 1, so 2 is not a divisor of 3087)
- 3087 / 3 = 1029 (the remainder is 0, so 3 is a divisor of 3087)
- ...
- 3087 / 3086 = 1.00032404407 (the remainder is 1, so 3086 is not a divisor of 3087)
- 3087 / 3087 = 1 (the remainder is 0, so 3087 is a divisor of 3087)
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 3087 (i.e. 55.560777532356). 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 )
- 3087 / 1 = 3087 (the remainder is 0, so 1 and 3087 are divisors of 3087)
- 3087 / 2 = 1543.5 (the remainder is 1, so 2 is not a divisor of 3087)
- 3087 / 3 = 1029 (the remainder is 0, so 3 and 1029 are divisors of 3087)
- ...
- 3087 / 54 = 57.166666666667 (the remainder is 9, so 54 is not a divisor of 3087)
- 3087 / 55 = 56.127272727273 (the remainder is 7, so 55 is not a divisor of 3087)