What are the divisors of 7078?
1, 2, 3539, 7078
- There is a total of 4 positive divisors.
- The sum of these divisors is 10620.
- The arithmetic mean is 2655.
2 even divisors
2, 7078
2 odd divisors
1, 3539
How to compute the divisors of 7078?
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 7078 by each of the numbers from 1 to 7078 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 7078 / 1 = 7078 (the remainder is 0, so 1 is a divisor of 7078)
- 7078 / 2 = 3539 (the remainder is 0, so 2 is a divisor of 7078)
- 7078 / 3 = 2359.3333333333 (the remainder is 1, so 3 is not a divisor of 7078)
- ...
- 7078 / 7077 = 1.0001413028119 (the remainder is 1, so 7077 is not a divisor of 7078)
- 7078 / 7078 = 1 (the remainder is 0, so 7078 is a divisor of 7078)
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 7078 (i.e. 84.130850465213). 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 )
- 7078 / 1 = 7078 (the remainder is 0, so 1 and 7078 are divisors of 7078)
- 7078 / 2 = 3539 (the remainder is 0, so 2 and 3539 are divisors of 7078)
- 7078 / 3 = 2359.3333333333 (the remainder is 1, so 3 is not a divisor of 7078)
- ...
- 7078 / 83 = 85.277108433735 (the remainder is 23, so 83 is not a divisor of 7078)
- 7078 / 84 = 84.261904761905 (the remainder is 22, so 84 is not a divisor of 7078)