What are the divisors of 1602?
1, 2, 3, 6, 9, 18, 89, 178, 267, 534, 801, 1602
- There is a total of 12 positive divisors.
- The sum of these divisors is 3510.
- The arithmetic mean is 292.5.
6 even divisors
2, 6, 18, 178, 534, 1602
6 odd divisors
1, 3, 9, 89, 267, 801
How to compute the divisors of 1602?
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 1602 by each of the numbers from 1 to 1602 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1602 / 1 = 1602 (the remainder is 0, so 1 is a divisor of 1602)
- 1602 / 2 = 801 (the remainder is 0, so 2 is a divisor of 1602)
- 1602 / 3 = 534 (the remainder is 0, so 3 is a divisor of 1602)
- ...
- 1602 / 1601 = 1.000624609619 (the remainder is 1, so 1601 is not a divisor of 1602)
- 1602 / 1602 = 1 (the remainder is 0, so 1602 is a divisor of 1602)
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 1602 (i.e. 40.024992192379). 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 )
- 1602 / 1 = 1602 (the remainder is 0, so 1 and 1602 are divisors of 1602)
- 1602 / 2 = 801 (the remainder is 0, so 2 and 801 are divisors of 1602)
- 1602 / 3 = 534 (the remainder is 0, so 3 and 534 are divisors of 1602)
- ...
- 1602 / 39 = 41.076923076923 (the remainder is 3, so 39 is not a divisor of 1602)
- 1602 / 40 = 40.05 (the remainder is 2, so 40 is not a divisor of 1602)