What are the divisors of 3336?
1, 2, 3, 4, 6, 8, 12, 24, 139, 278, 417, 556, 834, 1112, 1668, 3336
- There is a total of 16 positive divisors.
- The sum of these divisors is 8400.
- The arithmetic mean is 525.
12 even divisors
2, 4, 6, 8, 12, 24, 278, 556, 834, 1112, 1668, 3336
4 odd divisors
1, 3, 139, 417
How to compute the divisors of 3336?
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 3336 by each of the numbers from 1 to 3336 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3336 / 1 = 3336 (the remainder is 0, so 1 is a divisor of 3336)
- 3336 / 2 = 1668 (the remainder is 0, so 2 is a divisor of 3336)
- 3336 / 3 = 1112 (the remainder is 0, so 3 is a divisor of 3336)
- ...
- 3336 / 3335 = 1.000299850075 (the remainder is 1, so 3335 is not a divisor of 3336)
- 3336 / 3336 = 1 (the remainder is 0, so 3336 is a divisor of 3336)
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 3336 (i.e. 57.758116312775). 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 )
- 3336 / 1 = 3336 (the remainder is 0, so 1 and 3336 are divisors of 3336)
- 3336 / 2 = 1668 (the remainder is 0, so 2 and 1668 are divisors of 3336)
- 3336 / 3 = 1112 (the remainder is 0, so 3 and 1112 are divisors of 3336)
- ...
- 3336 / 56 = 59.571428571429 (the remainder is 32, so 56 is not a divisor of 3336)
- 3336 / 57 = 58.526315789474 (the remainder is 30, so 57 is not a divisor of 3336)