What are the divisors of 3238?
1, 2, 1619, 3238
- There is a total of 4 positive divisors.
- The sum of these divisors is 4860.
- The arithmetic mean is 1215.
2 even divisors
2, 3238
2 odd divisors
1, 1619
How to compute the divisors of 3238?
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 3238 by each of the numbers from 1 to 3238 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3238 / 1 = 3238 (the remainder is 0, so 1 is a divisor of 3238)
- 3238 / 2 = 1619 (the remainder is 0, so 2 is a divisor of 3238)
- 3238 / 3 = 1079.3333333333 (the remainder is 1, so 3 is not a divisor of 3238)
- ...
- 3238 / 3237 = 1.0003089280198 (the remainder is 1, so 3237 is not a divisor of 3238)
- 3238 / 3238 = 1 (the remainder is 0, so 3238 is a divisor of 3238)
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 3238 (i.e. 56.903426961827). 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 )
- 3238 / 1 = 3238 (the remainder is 0, so 1 and 3238 are divisors of 3238)
- 3238 / 2 = 1619 (the remainder is 0, so 2 and 1619 are divisors of 3238)
- 3238 / 3 = 1079.3333333333 (the remainder is 1, so 3 is not a divisor of 3238)
- ...
- 3238 / 55 = 58.872727272727 (the remainder is 48, so 55 is not a divisor of 3238)
- 3238 / 56 = 57.821428571429 (the remainder is 46, so 56 is not a divisor of 3238)