What are the divisors of 2584?
1, 2, 4, 8, 17, 19, 34, 38, 68, 76, 136, 152, 323, 646, 1292, 2584
- There is a total of 16 positive divisors.
- The sum of these divisors is 5400.
- The arithmetic mean is 337.5.
12 even divisors
2, 4, 8, 34, 38, 68, 76, 136, 152, 646, 1292, 2584
4 odd divisors
1, 17, 19, 323
How to compute the divisors of 2584?
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 2584 by each of the numbers from 1 to 2584 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2584 / 1 = 2584 (the remainder is 0, so 1 is a divisor of 2584)
- 2584 / 2 = 1292 (the remainder is 0, so 2 is a divisor of 2584)
- 2584 / 3 = 861.33333333333 (the remainder is 1, so 3 is not a divisor of 2584)
- ...
- 2584 / 2583 = 1.0003871467286 (the remainder is 1, so 2583 is not a divisor of 2584)
- 2584 / 2584 = 1 (the remainder is 0, so 2584 is a divisor of 2584)
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 2584 (i.e. 50.833060108555). 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 )
- 2584 / 1 = 2584 (the remainder is 0, so 1 and 2584 are divisors of 2584)
- 2584 / 2 = 1292 (the remainder is 0, so 2 and 1292 are divisors of 2584)
- 2584 / 3 = 861.33333333333 (the remainder is 1, so 3 is not a divisor of 2584)
- ...
- 2584 / 49 = 52.734693877551 (the remainder is 36, so 49 is not a divisor of 2584)
- 2584 / 50 = 51.68 (the remainder is 34, so 50 is not a divisor of 2584)