What are the divisors of 5949?
1, 3, 9, 661, 1983, 5949
- There is a total of 6 positive divisors.
- The sum of these divisors is 8606.
- The arithmetic mean is 1434.3333333333.
6 odd divisors
1, 3, 9, 661, 1983, 5949
How to compute the divisors of 5949?
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 5949 by each of the numbers from 1 to 5949 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5949 / 1 = 5949 (the remainder is 0, so 1 is a divisor of 5949)
- 5949 / 2 = 2974.5 (the remainder is 1, so 2 is not a divisor of 5949)
- 5949 / 3 = 1983 (the remainder is 0, so 3 is a divisor of 5949)
- ...
- 5949 / 5948 = 1.0001681237391 (the remainder is 1, so 5948 is not a divisor of 5949)
- 5949 / 5949 = 1 (the remainder is 0, so 5949 is a divisor of 5949)
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 5949 (i.e. 77.129760793095). 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 )
- 5949 / 1 = 5949 (the remainder is 0, so 1 and 5949 are divisors of 5949)
- 5949 / 2 = 2974.5 (the remainder is 1, so 2 is not a divisor of 5949)
- 5949 / 3 = 1983 (the remainder is 0, so 3 and 1983 are divisors of 5949)
- ...
- 5949 / 76 = 78.276315789474 (the remainder is 21, so 76 is not a divisor of 5949)
- 5949 / 77 = 77.25974025974 (the remainder is 20, so 77 is not a divisor of 5949)