What are the divisors of 5964?
1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 71, 84, 142, 213, 284, 426, 497, 852, 994, 1491, 1988, 2982, 5964
- There is a total of 24 positive divisors.
- The sum of these divisors is 16128.
- The arithmetic mean is 672.
16 even divisors
2, 4, 6, 12, 14, 28, 42, 84, 142, 284, 426, 852, 994, 1988, 2982, 5964
8 odd divisors
1, 3, 7, 21, 71, 213, 497, 1491
How to compute the divisors of 5964?
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 5964 by each of the numbers from 1 to 5964 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5964 / 1 = 5964 (the remainder is 0, so 1 is a divisor of 5964)
- 5964 / 2 = 2982 (the remainder is 0, so 2 is a divisor of 5964)
- 5964 / 3 = 1988 (the remainder is 0, so 3 is a divisor of 5964)
- ...
- 5964 / 5963 = 1.0001677008217 (the remainder is 1, so 5963 is not a divisor of 5964)
- 5964 / 5964 = 1 (the remainder is 0, so 5964 is a divisor of 5964)
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 5964 (i.e. 77.226938305231). 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 )
- 5964 / 1 = 5964 (the remainder is 0, so 1 and 5964 are divisors of 5964)
- 5964 / 2 = 2982 (the remainder is 0, so 2 and 2982 are divisors of 5964)
- 5964 / 3 = 1988 (the remainder is 0, so 3 and 1988 are divisors of 5964)
- ...
- 5964 / 76 = 78.473684210526 (the remainder is 36, so 76 is not a divisor of 5964)
- 5964 / 77 = 77.454545454545 (the remainder is 35, so 77 is not a divisor of 5964)