What are the divisors of 350?
1, 2, 5, 7, 10, 14, 25, 35, 50, 70, 175, 350
- There is a total of 12 positive divisors.
- The sum of these divisors is 744.
- The arithmetic mean is 62.
6 even divisors
2, 10, 14, 50, 70, 350
6 odd divisors
1, 5, 7, 25, 35, 175
How to compute the divisors of 350?
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 350 by each of the numbers from 1 to 350 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 350 / 1 = 350 (the remainder is 0, so 1 is a divisor of 350)
- 350 / 2 = 175 (the remainder is 0, so 2 is a divisor of 350)
- 350 / 3 = 116.66666666667 (the remainder is 2, so 3 is not a divisor of 350)
- ...
- 350 / 349 = 1.0028653295129 (the remainder is 1, so 349 is not a divisor of 350)
- 350 / 350 = 1 (the remainder is 0, so 350 is a divisor of 350)
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 350 (i.e. 18.70828693387). 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 )
- 350 / 1 = 350 (the remainder is 0, so 1 and 350 are divisors of 350)
- 350 / 2 = 175 (the remainder is 0, so 2 and 175 are divisors of 350)
- 350 / 3 = 116.66666666667 (the remainder is 2, so 3 is not a divisor of 350)
- ...
- 350 / 17 = 20.588235294118 (the remainder is 10, so 17 is not a divisor of 350)
- 350 / 18 = 19.444444444444 (the remainder is 8, so 18 is not a divisor of 350)