What are the divisors of 3144?
1, 2, 3, 4, 6, 8, 12, 24, 131, 262, 393, 524, 786, 1048, 1572, 3144
- There is a total of 16 positive divisors.
- The sum of these divisors is 7920.
- The arithmetic mean is 495.
12 even divisors
2, 4, 6, 8, 12, 24, 262, 524, 786, 1048, 1572, 3144
4 odd divisors
1, 3, 131, 393
How to compute the divisors of 3144?
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 3144 by each of the numbers from 1 to 3144 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3144 / 1 = 3144 (the remainder is 0, so 1 is a divisor of 3144)
- 3144 / 2 = 1572 (the remainder is 0, so 2 is a divisor of 3144)
- 3144 / 3 = 1048 (the remainder is 0, so 3 is a divisor of 3144)
- ...
- 3144 / 3143 = 1.000318167356 (the remainder is 1, so 3143 is not a divisor of 3144)
- 3144 / 3144 = 1 (the remainder is 0, so 3144 is a divisor of 3144)
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 3144 (i.e. 56.071383075505). 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 )
- 3144 / 1 = 3144 (the remainder is 0, so 1 and 3144 are divisors of 3144)
- 3144 / 2 = 1572 (the remainder is 0, so 2 and 1572 are divisors of 3144)
- 3144 / 3 = 1048 (the remainder is 0, so 3 and 1048 are divisors of 3144)
- ...
- 3144 / 55 = 57.163636363636 (the remainder is 9, so 55 is not a divisor of 3144)
- 3144 / 56 = 56.142857142857 (the remainder is 8, so 56 is not a divisor of 3144)