What are the divisors of 361?
1, 19, 361
- There is a total of 3 positive divisors.
- The sum of these divisors is 381.
- The arithmetic mean is 127.
3 odd divisors
1, 19, 361
How to compute the divisors of 361?
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 361 by each of the numbers from 1 to 361 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 361 / 1 = 361 (the remainder is 0, so 1 is a divisor of 361)
- 361 / 2 = 180.5 (the remainder is 1, so 2 is not a divisor of 361)
- 361 / 3 = 120.33333333333 (the remainder is 1, so 3 is not a divisor of 361)
- ...
- 361 / 360 = 1.0027777777778 (the remainder is 1, so 360 is not a divisor of 361)
- 361 / 361 = 1 (the remainder is 0, so 361 is a divisor of 361)
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 361 (i.e. 19). 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 )
- 361 / 1 = 361 (the remainder is 0, so 1 and 361 are divisors of 361)
- 361 / 2 = 180.5 (the remainder is 1, so 2 is not a divisor of 361)
- 361 / 3 = 120.33333333333 (the remainder is 1, so 3 is not a divisor of 361)
- ...
- 361 / 18 = 20.055555555556 (the remainder is 1, so 18 is not a divisor of 361)
- 361 / 19 = 19 (the remainder is 0, so 19 and 19 are divisors of 361)