What are the divisors of 3132?
1, 2, 3, 4, 6, 9, 12, 18, 27, 29, 36, 54, 58, 87, 108, 116, 174, 261, 348, 522, 783, 1044, 1566, 3132
- There is a total of 24 positive divisors.
- The sum of these divisors is 8400.
- The arithmetic mean is 350.
16 even divisors
2, 4, 6, 12, 18, 36, 54, 58, 108, 116, 174, 348, 522, 1044, 1566, 3132
8 odd divisors
1, 3, 9, 27, 29, 87, 261, 783
How to compute the divisors of 3132?
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 3132 by each of the numbers from 1 to 3132 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3132 / 1 = 3132 (the remainder is 0, so 1 is a divisor of 3132)
- 3132 / 2 = 1566 (the remainder is 0, so 2 is a divisor of 3132)
- 3132 / 3 = 1044 (the remainder is 0, so 3 is a divisor of 3132)
- ...
- 3132 / 3131 = 1.0003193867774 (the remainder is 1, so 3131 is not a divisor of 3132)
- 3132 / 3132 = 1 (the remainder is 0, so 3132 is a divisor of 3132)
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 3132 (i.e. 55.964274318533). 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 )
- 3132 / 1 = 3132 (the remainder is 0, so 1 and 3132 are divisors of 3132)
- 3132 / 2 = 1566 (the remainder is 0, so 2 and 1566 are divisors of 3132)
- 3132 / 3 = 1044 (the remainder is 0, so 3 and 1044 are divisors of 3132)
- ...
- 3132 / 54 = 58 (the remainder is 0, so 54 and 58 are divisors of 3132)
- 3132 / 55 = 56.945454545455 (the remainder is 52, so 55 is not a divisor of 3132)