What are the divisors of 3682?
1, 2, 7, 14, 263, 526, 1841, 3682
- There is a total of 8 positive divisors.
- The sum of these divisors is 6336.
- The arithmetic mean is 792.
4 even divisors
2, 14, 526, 3682
4 odd divisors
1, 7, 263, 1841
How to compute the divisors of 3682?
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 3682 by each of the numbers from 1 to 3682 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3682 / 1 = 3682 (the remainder is 0, so 1 is a divisor of 3682)
- 3682 / 2 = 1841 (the remainder is 0, so 2 is a divisor of 3682)
- 3682 / 3 = 1227.3333333333 (the remainder is 1, so 3 is not a divisor of 3682)
- ...
- 3682 / 3681 = 1.0002716653083 (the remainder is 1, so 3681 is not a divisor of 3682)
- 3682 / 3682 = 1 (the remainder is 0, so 3682 is a divisor of 3682)
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 3682 (i.e. 60.679485825112). 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 )
- 3682 / 1 = 3682 (the remainder is 0, so 1 and 3682 are divisors of 3682)
- 3682 / 2 = 1841 (the remainder is 0, so 2 and 1841 are divisors of 3682)
- 3682 / 3 = 1227.3333333333 (the remainder is 1, so 3 is not a divisor of 3682)
- ...
- 3682 / 59 = 62.406779661017 (the remainder is 24, so 59 is not a divisor of 3682)
- 3682 / 60 = 61.366666666667 (the remainder is 22, so 60 is not a divisor of 3682)