What are the divisors of 319?
1, 11, 29, 319
- There is a total of 4 positive divisors.
- The sum of these divisors is 360.
- The arithmetic mean is 90.
4 odd divisors
1, 11, 29, 319
How to compute the divisors of 319?
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 319 by each of the numbers from 1 to 319 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 319 / 1 = 319 (the remainder is 0, so 1 is a divisor of 319)
- 319 / 2 = 159.5 (the remainder is 1, so 2 is not a divisor of 319)
- 319 / 3 = 106.33333333333 (the remainder is 1, so 3 is not a divisor of 319)
- ...
- 319 / 318 = 1.0031446540881 (the remainder is 1, so 318 is not a divisor of 319)
- 319 / 319 = 1 (the remainder is 0, so 319 is a divisor of 319)
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 319 (i.e. 17.860571099492). 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 )
- 319 / 1 = 319 (the remainder is 0, so 1 and 319 are divisors of 319)
- 319 / 2 = 159.5 (the remainder is 1, so 2 is not a divisor of 319)
- 319 / 3 = 106.33333333333 (the remainder is 1, so 3 is not a divisor of 319)
- ...
- 319 / 16 = 19.9375 (the remainder is 15, so 16 is not a divisor of 319)
- 319 / 17 = 18.764705882353 (the remainder is 13, so 17 is not a divisor of 319)