What are the divisors of 950?
1, 2, 5, 10, 19, 25, 38, 50, 95, 190, 475, 950
- There is a total of 12 positive divisors.
- The sum of these divisors is 1860.
- The arithmetic mean is 155.
6 even divisors
2, 10, 38, 50, 190, 950
6 odd divisors
1, 5, 19, 25, 95, 475
How to compute the divisors of 950?
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 950 by each of the numbers from 1 to 950 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 950 / 1 = 950 (the remainder is 0, so 1 is a divisor of 950)
- 950 / 2 = 475 (the remainder is 0, so 2 is a divisor of 950)
- 950 / 3 = 316.66666666667 (the remainder is 2, so 3 is not a divisor of 950)
- ...
- 950 / 949 = 1.0010537407798 (the remainder is 1, so 949 is not a divisor of 950)
- 950 / 950 = 1 (the remainder is 0, so 950 is a divisor of 950)
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 950 (i.e. 30.822070014845). 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 )
- 950 / 1 = 950 (the remainder is 0, so 1 and 950 are divisors of 950)
- 950 / 2 = 475 (the remainder is 0, so 2 and 475 are divisors of 950)
- 950 / 3 = 316.66666666667 (the remainder is 2, so 3 is not a divisor of 950)
- ...
- 950 / 29 = 32.758620689655 (the remainder is 22, so 29 is not a divisor of 950)
- 950 / 30 = 31.666666666667 (the remainder is 20, so 30 is not a divisor of 950)