What are the divisors of 1111?
1, 11, 101, 1111
- There is a total of 4 positive divisors.
- The sum of these divisors is 1224.
- The arithmetic mean is 306.
4 odd divisors
1, 11, 101, 1111
How to compute the divisors of 1111?
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 1111 by each of the numbers from 1 to 1111 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 1111 / 1 = 1111 (the remainder is 0, so 1 is a divisor of 1111)
- 1111 / 2 = 555.5 (the remainder is 1, so 2 is not a divisor of 1111)
- 1111 / 3 = 370.33333333333 (the remainder is 1, so 3 is not a divisor of 1111)
- ...
- 1111 / 1110 = 1.0009009009009 (the remainder is 1, so 1110 is not a divisor of 1111)
- 1111 / 1111 = 1 (the remainder is 0, so 1111 is a divisor of 1111)
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 1111 (i.e. 33.331666624998). 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 )
- 1111 / 1 = 1111 (the remainder is 0, so 1 and 1111 are divisors of 1111)
- 1111 / 2 = 555.5 (the remainder is 1, so 2 is not a divisor of 1111)
- 1111 / 3 = 370.33333333333 (the remainder is 1, so 3 is not a divisor of 1111)
- ...
- 1111 / 32 = 34.71875 (the remainder is 23, so 32 is not a divisor of 1111)
- 1111 / 33 = 33.666666666667 (the remainder is 22, so 33 is not a divisor of 1111)