What are the divisors of 1143?
1, 3, 9, 127, 381, 1143
- There is a total of 6 positive divisors.
- The sum of these divisors is 1664.
- The arithmetic mean is 277.33333333333.
6 odd divisors
1, 3, 9, 127, 381, 1143
How to compute the divisors of 1143?
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 1143 by each of the numbers from 1 to 1143 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1143 / 1 = 1143 (the remainder is 0, so 1 is a divisor of 1143)
- 1143 / 2 = 571.5 (the remainder is 1, so 2 is not a divisor of 1143)
- 1143 / 3 = 381 (the remainder is 0, so 3 is a divisor of 1143)
- ...
- 1143 / 1142 = 1.0008756567426 (the remainder is 1, so 1142 is not a divisor of 1143)
- 1143 / 1143 = 1 (the remainder is 0, so 1143 is a divisor of 1143)
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 1143 (i.e. 33.808283008754). 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 )
- 1143 / 1 = 1143 (the remainder is 0, so 1 and 1143 are divisors of 1143)
- 1143 / 2 = 571.5 (the remainder is 1, so 2 is not a divisor of 1143)
- 1143 / 3 = 381 (the remainder is 0, so 3 and 381 are divisors of 1143)
- ...
- 1143 / 32 = 35.71875 (the remainder is 23, so 32 is not a divisor of 1143)
- 1143 / 33 = 34.636363636364 (the remainder is 21, so 33 is not a divisor of 1143)