What are the divisors of 1524?
1, 2, 3, 4, 6, 12, 127, 254, 381, 508, 762, 1524
- There is a total of 12 positive divisors.
- The sum of these divisors is 3584.
- The arithmetic mean is 298.66666666667.
8 even divisors
2, 4, 6, 12, 254, 508, 762, 1524
4 odd divisors
1, 3, 127, 381
How to compute the divisors of 1524?
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 1524 by each of the numbers from 1 to 1524 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1524 / 1 = 1524 (the remainder is 0, so 1 is a divisor of 1524)
- 1524 / 2 = 762 (the remainder is 0, so 2 is a divisor of 1524)
- 1524 / 3 = 508 (the remainder is 0, so 3 is a divisor of 1524)
- ...
- 1524 / 1523 = 1.0006565988181 (the remainder is 1, so 1523 is not a divisor of 1524)
- 1524 / 1524 = 1 (the remainder is 0, so 1524 is a divisor of 1524)
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 1524 (i.e. 39.038442591886). 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 )
- 1524 / 1 = 1524 (the remainder is 0, so 1 and 1524 are divisors of 1524)
- 1524 / 2 = 762 (the remainder is 0, so 2 and 762 are divisors of 1524)
- 1524 / 3 = 508 (the remainder is 0, so 3 and 508 are divisors of 1524)
- ...
- 1524 / 38 = 40.105263157895 (the remainder is 4, so 38 is not a divisor of 1524)
- 1524 / 39 = 39.076923076923 (the remainder is 3, so 39 is not a divisor of 1524)