What are the divisors of 5746?
1, 2, 13, 17, 26, 34, 169, 221, 338, 442, 2873, 5746
- There is a total of 12 positive divisors.
- The sum of these divisors is 9882.
- The arithmetic mean is 823.5.
6 even divisors
2, 26, 34, 338, 442, 5746
6 odd divisors
1, 13, 17, 169, 221, 2873
How to compute the divisors of 5746?
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 5746 by each of the numbers from 1 to 5746 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5746 / 1 = 5746 (the remainder is 0, so 1 is a divisor of 5746)
- 5746 / 2 = 2873 (the remainder is 0, so 2 is a divisor of 5746)
- 5746 / 3 = 1915.3333333333 (the remainder is 1, so 3 is not a divisor of 5746)
- ...
- 5746 / 5745 = 1.0001740644038 (the remainder is 1, so 5745 is not a divisor of 5746)
- 5746 / 5746 = 1 (the remainder is 0, so 5746 is a divisor of 5746)
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 5746 (i.e. 75.802374632989). 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 )
- 5746 / 1 = 5746 (the remainder is 0, so 1 and 5746 are divisors of 5746)
- 5746 / 2 = 2873 (the remainder is 0, so 2 and 2873 are divisors of 5746)
- 5746 / 3 = 1915.3333333333 (the remainder is 1, so 3 is not a divisor of 5746)
- ...
- 5746 / 74 = 77.648648648649 (the remainder is 48, so 74 is not a divisor of 5746)
- 5746 / 75 = 76.613333333333 (the remainder is 46, so 75 is not a divisor of 5746)