What are the divisors of 5796?
1, 2, 3, 4, 6, 7, 9, 12, 14, 18, 21, 23, 28, 36, 42, 46, 63, 69, 84, 92, 126, 138, 161, 207, 252, 276, 322, 414, 483, 644, 828, 966, 1449, 1932, 2898, 5796
- There is a total of 36 positive divisors.
- The sum of these divisors is 17472.
- The arithmetic mean is 485.33333333333.
24 even divisors
2, 4, 6, 12, 14, 18, 28, 36, 42, 46, 84, 92, 126, 138, 252, 276, 322, 414, 644, 828, 966, 1932, 2898, 5796
12 odd divisors
1, 3, 7, 9, 21, 23, 63, 69, 161, 207, 483, 1449
How to compute the divisors of 5796?
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 5796 by each of the numbers from 1 to 5796 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5796 / 1 = 5796 (the remainder is 0, so 1 is a divisor of 5796)
- 5796 / 2 = 2898 (the remainder is 0, so 2 is a divisor of 5796)
- 5796 / 3 = 1932 (the remainder is 0, so 3 is a divisor of 5796)
- ...
- 5796 / 5795 = 1.0001725625539 (the remainder is 1, so 5795 is not a divisor of 5796)
- 5796 / 5796 = 1 (the remainder is 0, so 5796 is a divisor of 5796)
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 5796 (i.e. 76.131465242697). 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 )
- 5796 / 1 = 5796 (the remainder is 0, so 1 and 5796 are divisors of 5796)
- 5796 / 2 = 2898 (the remainder is 0, so 2 and 2898 are divisors of 5796)
- 5796 / 3 = 1932 (the remainder is 0, so 3 and 1932 are divisors of 5796)
- ...
- 5796 / 75 = 77.28 (the remainder is 21, so 75 is not a divisor of 5796)
- 5796 / 76 = 76.263157894737 (the remainder is 20, so 76 is not a divisor of 5796)