What are the divisors of 1503?
1, 3, 9, 167, 501, 1503
- There is a total of 6 positive divisors.
- The sum of these divisors is 2184.
- The arithmetic mean is 364.
6 odd divisors
1, 3, 9, 167, 501, 1503
How to compute the divisors of 1503?
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 1503 by each of the numbers from 1 to 1503 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1503 / 1 = 1503 (the remainder is 0, so 1 is a divisor of 1503)
- 1503 / 2 = 751.5 (the remainder is 1, so 2 is not a divisor of 1503)
- 1503 / 3 = 501 (the remainder is 0, so 3 is a divisor of 1503)
- ...
- 1503 / 1502 = 1.0006657789614 (the remainder is 1, so 1502 is not a divisor of 1503)
- 1503 / 1503 = 1 (the remainder is 0, so 1503 is a divisor of 1503)
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 1503 (i.e. 38.76854394996). 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 )
- 1503 / 1 = 1503 (the remainder is 0, so 1 and 1503 are divisors of 1503)
- 1503 / 2 = 751.5 (the remainder is 1, so 2 is not a divisor of 1503)
- 1503 / 3 = 501 (the remainder is 0, so 3 and 501 are divisors of 1503)
- ...
- 1503 / 37 = 40.621621621622 (the remainder is 23, so 37 is not a divisor of 1503)
- 1503 / 38 = 39.552631578947 (the remainder is 21, so 38 is not a divisor of 1503)