What are the divisors of 4047?
1, 3, 19, 57, 71, 213, 1349, 4047
- There is a total of 8 positive divisors.
- The sum of these divisors is 5760.
- The arithmetic mean is 720.
8 odd divisors
1, 3, 19, 57, 71, 213, 1349, 4047
How to compute the divisors of 4047?
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 4047 by each of the numbers from 1 to 4047 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4047 / 1 = 4047 (the remainder is 0, so 1 is a divisor of 4047)
- 4047 / 2 = 2023.5 (the remainder is 1, so 2 is not a divisor of 4047)
- 4047 / 3 = 1349 (the remainder is 0, so 3 is a divisor of 4047)
- ...
- 4047 / 4046 = 1.0002471576866 (the remainder is 1, so 4046 is not a divisor of 4047)
- 4047 / 4047 = 1 (the remainder is 0, so 4047 is a divisor of 4047)
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 4047 (i.e. 63.616035714276). 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 )
- 4047 / 1 = 4047 (the remainder is 0, so 1 and 4047 are divisors of 4047)
- 4047 / 2 = 2023.5 (the remainder is 1, so 2 is not a divisor of 4047)
- 4047 / 3 = 1349 (the remainder is 0, so 3 and 1349 are divisors of 4047)
- ...
- 4047 / 62 = 65.274193548387 (the remainder is 17, so 62 is not a divisor of 4047)
- 4047 / 63 = 64.238095238095 (the remainder is 15, so 63 is not a divisor of 4047)