What are the divisors of 2586?
1, 2, 3, 6, 431, 862, 1293, 2586
- There is a total of 8 positive divisors.
- The sum of these divisors is 5184.
- The arithmetic mean is 648.
4 even divisors
2, 6, 862, 2586
4 odd divisors
1, 3, 431, 1293
How to compute the divisors of 2586?
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 2586 by each of the numbers from 1 to 2586 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2586 / 1 = 2586 (the remainder is 0, so 1 is a divisor of 2586)
- 2586 / 2 = 1293 (the remainder is 0, so 2 is a divisor of 2586)
- 2586 / 3 = 862 (the remainder is 0, so 3 is a divisor of 2586)
- ...
- 2586 / 2585 = 1.0003868471954 (the remainder is 1, so 2585 is not a divisor of 2586)
- 2586 / 2586 = 1 (the remainder is 0, so 2586 is a divisor of 2586)
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 2586 (i.e. 50.852728540364). 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 )
- 2586 / 1 = 2586 (the remainder is 0, so 1 and 2586 are divisors of 2586)
- 2586 / 2 = 1293 (the remainder is 0, so 2 and 1293 are divisors of 2586)
- 2586 / 3 = 862 (the remainder is 0, so 3 and 862 are divisors of 2586)
- ...
- 2586 / 49 = 52.775510204082 (the remainder is 38, so 49 is not a divisor of 2586)
- 2586 / 50 = 51.72 (the remainder is 36, so 50 is not a divisor of 2586)