What are the divisors of 875?
1, 5, 7, 25, 35, 125, 175, 875
- There is a total of 8 positive divisors.
- The sum of these divisors is 1248.
- The arithmetic mean is 156.
8 odd divisors
1, 5, 7, 25, 35, 125, 175, 875
How to compute the divisors of 875?
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 875 by each of the numbers from 1 to 875 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 875 / 1 = 875 (the remainder is 0, so 1 is a divisor of 875)
- 875 / 2 = 437.5 (the remainder is 1, so 2 is not a divisor of 875)
- 875 / 3 = 291.66666666667 (the remainder is 2, so 3 is not a divisor of 875)
- ...
- 875 / 874 = 1.0011441647597 (the remainder is 1, so 874 is not a divisor of 875)
- 875 / 875 = 1 (the remainder is 0, so 875 is a divisor of 875)
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 875 (i.e. 29.580398915498). 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 )
- 875 / 1 = 875 (the remainder is 0, so 1 and 875 are divisors of 875)
- 875 / 2 = 437.5 (the remainder is 1, so 2 is not a divisor of 875)
- 875 / 3 = 291.66666666667 (the remainder is 2, so 3 is not a divisor of 875)
- ...
- 875 / 28 = 31.25 (the remainder is 7, so 28 is not a divisor of 875)
- 875 / 29 = 30.172413793103 (the remainder is 5, so 29 is not a divisor of 875)