What are the divisors of 2645?
1, 5, 23, 115, 529, 2645
- There is a total of 6 positive divisors.
- The sum of these divisors is 3318.
- The arithmetic mean is 553.
6 odd divisors
1, 5, 23, 115, 529, 2645
How to compute the divisors of 2645?
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 2645 by each of the numbers from 1 to 2645 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 2645 / 1 = 2645 (the remainder is 0, so 1 is a divisor of 2645)
- 2645 / 2 = 1322.5 (the remainder is 1, so 2 is not a divisor of 2645)
- 2645 / 3 = 881.66666666667 (the remainder is 2, so 3 is not a divisor of 2645)
- ...
- 2645 / 2644 = 1.000378214826 (the remainder is 1, so 2644 is not a divisor of 2645)
- 2645 / 2645 = 1 (the remainder is 0, so 2645 is a divisor of 2645)
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 2645 (i.e. 51.429563482495). 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 )
- 2645 / 1 = 2645 (the remainder is 0, so 1 and 2645 are divisors of 2645)
- 2645 / 2 = 1322.5 (the remainder is 1, so 2 is not a divisor of 2645)
- 2645 / 3 = 881.66666666667 (the remainder is 2, so 3 is not a divisor of 2645)
- ...
- 2645 / 50 = 52.9 (the remainder is 45, so 50 is not a divisor of 2645)
- 2645 / 51 = 51.862745098039 (the remainder is 44, so 51 is not a divisor of 2645)