What are the divisors of 2796?
1, 2, 3, 4, 6, 12, 233, 466, 699, 932, 1398, 2796
- There is a total of 12 positive divisors.
- The sum of these divisors is 6552.
- The arithmetic mean is 546.
8 even divisors
2, 4, 6, 12, 466, 932, 1398, 2796
4 odd divisors
1, 3, 233, 699
How to compute the divisors of 2796?
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 2796 by each of the numbers from 1 to 2796 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2796 / 1 = 2796 (the remainder is 0, so 1 is a divisor of 2796)
- 2796 / 2 = 1398 (the remainder is 0, so 2 is a divisor of 2796)
- 2796 / 3 = 932 (the remainder is 0, so 3 is a divisor of 2796)
- ...
- 2796 / 2795 = 1.0003577817531 (the remainder is 1, so 2795 is not a divisor of 2796)
- 2796 / 2796 = 1 (the remainder is 0, so 2796 is a divisor of 2796)
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 2796 (i.e. 52.877216265609). 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 )
- 2796 / 1 = 2796 (the remainder is 0, so 1 and 2796 are divisors of 2796)
- 2796 / 2 = 1398 (the remainder is 0, so 2 and 1398 are divisors of 2796)
- 2796 / 3 = 932 (the remainder is 0, so 3 and 932 are divisors of 2796)
- ...
- 2796 / 51 = 54.823529411765 (the remainder is 42, so 51 is not a divisor of 2796)
- 2796 / 52 = 53.769230769231 (the remainder is 40, so 52 is not a divisor of 2796)