What are the divisors of 1200?
1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 20, 24, 25, 30, 40, 48, 50, 60, 75, 80, 100, 120, 150, 200, 240, 300, 400, 600, 1200
- There is a total of 30 positive divisors.
- The sum of these divisors is 3844.
- The arithmetic mean is 128.13333333333.
24 even divisors
2, 4, 6, 8, 10, 12, 16, 20, 24, 30, 40, 48, 50, 60, 80, 100, 120, 150, 200, 240, 300, 400, 600, 1200
6 odd divisors
1, 3, 5, 15, 25, 75
How to compute the divisors of 1200?
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 1200 by each of the numbers from 1 to 1200 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1200 / 1 = 1200 (the remainder is 0, so 1 is a divisor of 1200)
- 1200 / 2 = 600 (the remainder is 0, so 2 is a divisor of 1200)
- 1200 / 3 = 400 (the remainder is 0, so 3 is a divisor of 1200)
- ...
- 1200 / 1199 = 1.000834028357 (the remainder is 1, so 1199 is not a divisor of 1200)
- 1200 / 1200 = 1 (the remainder is 0, so 1200 is a divisor of 1200)
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 1200 (i.e. 34.641016151378). 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 )
- 1200 / 1 = 1200 (the remainder is 0, so 1 and 1200 are divisors of 1200)
- 1200 / 2 = 600 (the remainder is 0, so 2 and 600 are divisors of 1200)
- 1200 / 3 = 400 (the remainder is 0, so 3 and 400 are divisors of 1200)
- ...
- 1200 / 33 = 36.363636363636 (the remainder is 12, so 33 is not a divisor of 1200)
- 1200 / 34 = 35.294117647059 (the remainder is 10, so 34 is not a divisor of 1200)