What are the divisors of 5271?
1, 3, 7, 21, 251, 753, 1757, 5271
- There is a total of 8 positive divisors.
- The sum of these divisors is 8064.
- The arithmetic mean is 1008.
8 odd divisors
1, 3, 7, 21, 251, 753, 1757, 5271
How to compute the divisors of 5271?
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 5271 by each of the numbers from 1 to 5271 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5271 / 1 = 5271 (the remainder is 0, so 1 is a divisor of 5271)
- 5271 / 2 = 2635.5 (the remainder is 1, so 2 is not a divisor of 5271)
- 5271 / 3 = 1757 (the remainder is 0, so 3 is a divisor of 5271)
- ...
- 5271 / 5270 = 1.0001897533207 (the remainder is 1, so 5270 is not a divisor of 5271)
- 5271 / 5271 = 1 (the remainder is 0, so 5271 is a divisor of 5271)
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 5271 (i.e. 72.601652873747). 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 )
- 5271 / 1 = 5271 (the remainder is 0, so 1 and 5271 are divisors of 5271)
- 5271 / 2 = 2635.5 (the remainder is 1, so 2 is not a divisor of 5271)
- 5271 / 3 = 1757 (the remainder is 0, so 3 and 1757 are divisors of 5271)
- ...
- 5271 / 71 = 74.239436619718 (the remainder is 17, so 71 is not a divisor of 5271)
- 5271 / 72 = 73.208333333333 (the remainder is 15, so 72 is not a divisor of 5271)