What are the divisors of 3578?
1, 2, 1789, 3578
- There is a total of 4 positive divisors.
- The sum of these divisors is 5370.
- The arithmetic mean is 1342.5.
2 even divisors
2, 3578
2 odd divisors
1, 1789
How to compute the divisors of 3578?
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 3578 by each of the numbers from 1 to 3578 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3578 / 1 = 3578 (the remainder is 0, so 1 is a divisor of 3578)
- 3578 / 2 = 1789 (the remainder is 0, so 2 is a divisor of 3578)
- 3578 / 3 = 1192.6666666667 (the remainder is 2, so 3 is not a divisor of 3578)
- ...
- 3578 / 3577 = 1.0002795638803 (the remainder is 1, so 3577 is not a divisor of 3578)
- 3578 / 3578 = 1 (the remainder is 0, so 3578 is a divisor of 3578)
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 3578 (i.e. 59.816385714953). 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 )
- 3578 / 1 = 3578 (the remainder is 0, so 1 and 3578 are divisors of 3578)
- 3578 / 2 = 1789 (the remainder is 0, so 2 and 1789 are divisors of 3578)
- 3578 / 3 = 1192.6666666667 (the remainder is 2, so 3 is not a divisor of 3578)
- ...
- 3578 / 58 = 61.689655172414 (the remainder is 40, so 58 is not a divisor of 3578)
- 3578 / 59 = 60.64406779661 (the remainder is 38, so 59 is not a divisor of 3578)