What are the divisors of 5782?
1, 2, 7, 14, 49, 59, 98, 118, 413, 826, 2891, 5782
- There is a total of 12 positive divisors.
- The sum of these divisors is 10260.
- The arithmetic mean is 855.
6 even divisors
2, 14, 98, 118, 826, 5782
6 odd divisors
1, 7, 49, 59, 413, 2891
How to compute the divisors of 5782?
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 5782 by each of the numbers from 1 to 5782 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5782 / 1 = 5782 (the remainder is 0, so 1 is a divisor of 5782)
- 5782 / 2 = 2891 (the remainder is 0, so 2 is a divisor of 5782)
- 5782 / 3 = 1927.3333333333 (the remainder is 1, so 3 is not a divisor of 5782)
- ...
- 5782 / 5781 = 1.0001729804532 (the remainder is 1, so 5781 is not a divisor of 5782)
- 5782 / 5782 = 1 (the remainder is 0, so 5782 is a divisor of 5782)
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 5782 (i.e. 76.039463438402). 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 )
- 5782 / 1 = 5782 (the remainder is 0, so 1 and 5782 are divisors of 5782)
- 5782 / 2 = 2891 (the remainder is 0, so 2 and 2891 are divisors of 5782)
- 5782 / 3 = 1927.3333333333 (the remainder is 1, so 3 is not a divisor of 5782)
- ...
- 5782 / 75 = 77.093333333333 (the remainder is 7, so 75 is not a divisor of 5782)
- 5782 / 76 = 76.078947368421 (the remainder is 6, so 76 is not a divisor of 5782)