What are the divisors of 3278?
1, 2, 11, 22, 149, 298, 1639, 3278
- There is a total of 8 positive divisors.
- The sum of these divisors is 5400.
- The arithmetic mean is 675.
4 even divisors
2, 22, 298, 3278
4 odd divisors
1, 11, 149, 1639
How to compute the divisors of 3278?
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 3278 by each of the numbers from 1 to 3278 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3278 / 1 = 3278 (the remainder is 0, so 1 is a divisor of 3278)
- 3278 / 2 = 1639 (the remainder is 0, so 2 is a divisor of 3278)
- 3278 / 3 = 1092.6666666667 (the remainder is 2, so 3 is not a divisor of 3278)
- ...
- 3278 / 3277 = 1.0003051571559 (the remainder is 1, so 3277 is not a divisor of 3278)
- 3278 / 3278 = 1 (the remainder is 0, so 3278 is a divisor of 3278)
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 3278 (i.e. 57.253820833199). 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 )
- 3278 / 1 = 3278 (the remainder is 0, so 1 and 3278 are divisors of 3278)
- 3278 / 2 = 1639 (the remainder is 0, so 2 and 1639 are divisors of 3278)
- 3278 / 3 = 1092.6666666667 (the remainder is 2, so 3 is not a divisor of 3278)
- ...
- 3278 / 56 = 58.535714285714 (the remainder is 30, so 56 is not a divisor of 3278)
- 3278 / 57 = 57.508771929825 (the remainder is 29, so 57 is not a divisor of 3278)