What are the divisors of 3658?
1, 2, 31, 59, 62, 118, 1829, 3658
- There is a total of 8 positive divisors.
- The sum of these divisors is 5760.
- The arithmetic mean is 720.
4 even divisors
2, 62, 118, 3658
4 odd divisors
1, 31, 59, 1829
How to compute the divisors of 3658?
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 3658 by each of the numbers from 1 to 3658 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3658 / 1 = 3658 (the remainder is 0, so 1 is a divisor of 3658)
- 3658 / 2 = 1829 (the remainder is 0, so 2 is a divisor of 3658)
- 3658 / 3 = 1219.3333333333 (the remainder is 1, so 3 is not a divisor of 3658)
- ...
- 3658 / 3657 = 1.0002734481816 (the remainder is 1, so 3657 is not a divisor of 3658)
- 3658 / 3658 = 1 (the remainder is 0, so 3658 is a divisor of 3658)
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 3658 (i.e. 60.48140210015). 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 )
- 3658 / 1 = 3658 (the remainder is 0, so 1 and 3658 are divisors of 3658)
- 3658 / 2 = 1829 (the remainder is 0, so 2 and 1829 are divisors of 3658)
- 3658 / 3 = 1219.3333333333 (the remainder is 1, so 3 is not a divisor of 3658)
- ...
- 3658 / 59 = 62 (the remainder is 0, so 59 and 62 are divisors of 3658)
- 3658 / 60 = 60.966666666667 (the remainder is 58, so 60 is not a divisor of 3658)