What are the divisors of 4059?
1, 3, 9, 11, 33, 41, 99, 123, 369, 451, 1353, 4059
- There is a total of 12 positive divisors.
- The sum of these divisors is 6552.
- The arithmetic mean is 546.
12 odd divisors
1, 3, 9, 11, 33, 41, 99, 123, 369, 451, 1353, 4059
How to compute the divisors of 4059?
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 4059 by each of the numbers from 1 to 4059 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4059 / 1 = 4059 (the remainder is 0, so 1 is a divisor of 4059)
- 4059 / 2 = 2029.5 (the remainder is 1, so 2 is not a divisor of 4059)
- 4059 / 3 = 1353 (the remainder is 0, so 3 is a divisor of 4059)
- ...
- 4059 / 4058 = 1.0002464268112 (the remainder is 1, so 4058 is not a divisor of 4059)
- 4059 / 4059 = 1 (the remainder is 0, so 4059 is a divisor of 4059)
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 4059 (i.e. 63.710281744786). 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 )
- 4059 / 1 = 4059 (the remainder is 0, so 1 and 4059 are divisors of 4059)
- 4059 / 2 = 2029.5 (the remainder is 1, so 2 is not a divisor of 4059)
- 4059 / 3 = 1353 (the remainder is 0, so 3 and 1353 are divisors of 4059)
- ...
- 4059 / 62 = 65.467741935484 (the remainder is 29, so 62 is not a divisor of 4059)
- 4059 / 63 = 64.428571428571 (the remainder is 27, so 63 is not a divisor of 4059)