What are the divisors of 5646?
1, 2, 3, 6, 941, 1882, 2823, 5646
- There is a total of 8 positive divisors.
- The sum of these divisors is 11304.
- The arithmetic mean is 1413.
4 even divisors
2, 6, 1882, 5646
4 odd divisors
1, 3, 941, 2823
How to compute the divisors of 5646?
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 5646 by each of the numbers from 1 to 5646 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5646 / 1 = 5646 (the remainder is 0, so 1 is a divisor of 5646)
- 5646 / 2 = 2823 (the remainder is 0, so 2 is a divisor of 5646)
- 5646 / 3 = 1882 (the remainder is 0, so 3 is a divisor of 5646)
- ...
- 5646 / 5645 = 1.0001771479185 (the remainder is 1, so 5645 is not a divisor of 5646)
- 5646 / 5646 = 1 (the remainder is 0, so 5646 is a divisor of 5646)
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 5646 (i.e. 75.139869576677). 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 )
- 5646 / 1 = 5646 (the remainder is 0, so 1 and 5646 are divisors of 5646)
- 5646 / 2 = 2823 (the remainder is 0, so 2 and 2823 are divisors of 5646)
- 5646 / 3 = 1882 (the remainder is 0, so 3 and 1882 are divisors of 5646)
- ...
- 5646 / 74 = 76.297297297297 (the remainder is 22, so 74 is not a divisor of 5646)
- 5646 / 75 = 75.28 (the remainder is 21, so 75 is not a divisor of 5646)