What are the divisors of 1509?
1, 3, 503, 1509
- There is a total of 4 positive divisors.
- The sum of these divisors is 2016.
- The arithmetic mean is 504.
4 odd divisors
1, 3, 503, 1509
How to compute the divisors of 1509?
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 1509 by each of the numbers from 1 to 1509 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1509 / 1 = 1509 (the remainder is 0, so 1 is a divisor of 1509)
- 1509 / 2 = 754.5 (the remainder is 1, so 2 is not a divisor of 1509)
- 1509 / 3 = 503 (the remainder is 0, so 3 is a divisor of 1509)
- ...
- 1509 / 1508 = 1.0006631299735 (the remainder is 1, so 1508 is not a divisor of 1509)
- 1509 / 1509 = 1 (the remainder is 0, so 1509 is a divisor of 1509)
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 1509 (i.e. 38.84584919911). 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 )
- 1509 / 1 = 1509 (the remainder is 0, so 1 and 1509 are divisors of 1509)
- 1509 / 2 = 754.5 (the remainder is 1, so 2 is not a divisor of 1509)
- 1509 / 3 = 503 (the remainder is 0, so 3 and 503 are divisors of 1509)
- ...
- 1509 / 37 = 40.783783783784 (the remainder is 29, so 37 is not a divisor of 1509)
- 1509 / 38 = 39.710526315789 (the remainder is 27, so 38 is not a divisor of 1509)