What are the divisors of 1542?
1, 2, 3, 6, 257, 514, 771, 1542
- There is a total of 8 positive divisors.
- The sum of these divisors is 3096.
- The arithmetic mean is 387.
4 even divisors
2, 6, 514, 1542
4 odd divisors
1, 3, 257, 771
How to compute the divisors of 1542?
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 1542 by each of the numbers from 1 to 1542 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1542 / 1 = 1542 (the remainder is 0, so 1 is a divisor of 1542)
- 1542 / 2 = 771 (the remainder is 0, so 2 is a divisor of 1542)
- 1542 / 3 = 514 (the remainder is 0, so 3 is a divisor of 1542)
- ...
- 1542 / 1541 = 1.0006489292667 (the remainder is 1, so 1541 is not a divisor of 1542)
- 1542 / 1542 = 1 (the remainder is 0, so 1542 is a divisor of 1542)
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 1542 (i.e. 39.268307832144). 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 )
- 1542 / 1 = 1542 (the remainder is 0, so 1 and 1542 are divisors of 1542)
- 1542 / 2 = 771 (the remainder is 0, so 2 and 771 are divisors of 1542)
- 1542 / 3 = 514 (the remainder is 0, so 3 and 514 are divisors of 1542)
- ...
- 1542 / 38 = 40.578947368421 (the remainder is 22, so 38 is not a divisor of 1542)
- 1542 / 39 = 39.538461538462 (the remainder is 21, so 39 is not a divisor of 1542)