What are the divisors of 4778?
1, 2, 2389, 4778
- There is a total of 4 positive divisors.
- The sum of these divisors is 7170.
- The arithmetic mean is 1792.5.
2 even divisors
2, 4778
2 odd divisors
1, 2389
How to compute the divisors of 4778?
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 4778 by each of the numbers from 1 to 4778 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 4778 / 1 = 4778 (the remainder is 0, so 1 is a divisor of 4778)
- 4778 / 2 = 2389 (the remainder is 0, so 2 is a divisor of 4778)
- 4778 / 3 = 1592.6666666667 (the remainder is 2, so 3 is not a divisor of 4778)
- ...
- 4778 / 4777 = 1.0002093364036 (the remainder is 1, so 4777 is not a divisor of 4778)
- 4778 / 4778 = 1 (the remainder is 0, so 4778 is a divisor of 4778)
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 4778 (i.e. 69.123078635142). 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 )
- 4778 / 1 = 4778 (the remainder is 0, so 1 and 4778 are divisors of 4778)
- 4778 / 2 = 2389 (the remainder is 0, so 2 and 2389 are divisors of 4778)
- 4778 / 3 = 1592.6666666667 (the remainder is 2, so 3 is not a divisor of 4778)
- ...
- 4778 / 68 = 70.264705882353 (the remainder is 18, so 68 is not a divisor of 4778)
- 4778 / 69 = 69.246376811594 (the remainder is 17, so 69 is not a divisor of 4778)