What are the divisors of 377?
1, 13, 29, 377
- There is a total of 4 positive divisors.
- The sum of these divisors is 420.
- The arithmetic mean is 105.
4 odd divisors
1, 13, 29, 377
How to compute the divisors of 377?
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 377 by each of the numbers from 1 to 377 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 377 / 1 = 377 (the remainder is 0, so 1 is a divisor of 377)
- 377 / 2 = 188.5 (the remainder is 1, so 2 is not a divisor of 377)
- 377 / 3 = 125.66666666667 (the remainder is 2, so 3 is not a divisor of 377)
- ...
- 377 / 376 = 1.0026595744681 (the remainder is 1, so 376 is not a divisor of 377)
- 377 / 377 = 1 (the remainder is 0, so 377 is a divisor of 377)
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 377 (i.e. 19.416487838948). 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 )
- 377 / 1 = 377 (the remainder is 0, so 1 and 377 are divisors of 377)
- 377 / 2 = 188.5 (the remainder is 1, so 2 is not a divisor of 377)
- 377 / 3 = 125.66666666667 (the remainder is 2, so 3 is not a divisor of 377)
- ...
- 377 / 18 = 20.944444444444 (the remainder is 17, so 18 is not a divisor of 377)
- 377 / 19 = 19.842105263158 (the remainder is 16, so 19 is not a divisor of 377)