What are the divisors of 3058?
1, 2, 11, 22, 139, 278, 1529, 3058
- There is a total of 8 positive divisors.
- The sum of these divisors is 5040.
- The arithmetic mean is 630.
4 even divisors
2, 22, 278, 3058
4 odd divisors
1, 11, 139, 1529
How to compute the divisors of 3058?
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 3058 by each of the numbers from 1 to 3058 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3058 / 1 = 3058 (the remainder is 0, so 1 is a divisor of 3058)
- 3058 / 2 = 1529 (the remainder is 0, so 2 is a divisor of 3058)
- 3058 / 3 = 1019.3333333333 (the remainder is 1, so 3 is not a divisor of 3058)
- ...
- 3058 / 3057 = 1.0003271180896 (the remainder is 1, so 3057 is not a divisor of 3058)
- 3058 / 3058 = 1 (the remainder is 0, so 3058 is a divisor of 3058)
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 3058 (i.e. 55.299186250794). 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 )
- 3058 / 1 = 3058 (the remainder is 0, so 1 and 3058 are divisors of 3058)
- 3058 / 2 = 1529 (the remainder is 0, so 2 and 1529 are divisors of 3058)
- 3058 / 3 = 1019.3333333333 (the remainder is 1, so 3 is not a divisor of 3058)
- ...
- 3058 / 54 = 56.62962962963 (the remainder is 34, so 54 is not a divisor of 3058)
- 3058 / 55 = 55.6 (the remainder is 33, so 55 is not a divisor of 3058)