What are the divisors of 313?
1, 313
- There is a total of 2 positive divisors.
- The sum of these divisors is 314.
- The arithmetic mean is 157.
2 odd divisors
1, 313
How to compute the divisors of 313?
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 313 by each of the numbers from 1 to 313 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 313 / 1 = 313 (the remainder is 0, so 1 is a divisor of 313)
- 313 / 2 = 156.5 (the remainder is 1, so 2 is not a divisor of 313)
- 313 / 3 = 104.33333333333 (the remainder is 1, so 3 is not a divisor of 313)
- ...
- 313 / 312 = 1.0032051282051 (the remainder is 1, so 312 is not a divisor of 313)
- 313 / 313 = 1 (the remainder is 0, so 313 is a divisor of 313)
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 313 (i.e. 17.691806012954). 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 )
- 313 / 1 = 313 (the remainder is 0, so 1 and 313 are divisors of 313)
- 313 / 2 = 156.5 (the remainder is 1, so 2 is not a divisor of 313)
- 313 / 3 = 104.33333333333 (the remainder is 1, so 3 is not a divisor of 313)
- ...
- 313 / 16 = 19.5625 (the remainder is 9, so 16 is not a divisor of 313)
- 313 / 17 = 18.411764705882 (the remainder is 7, so 17 is not a divisor of 313)