What are the divisors of 5670?
1, 2, 3, 5, 6, 7, 9, 10, 14, 15, 18, 21, 27, 30, 35, 42, 45, 54, 63, 70, 81, 90, 105, 126, 135, 162, 189, 210, 270, 315, 378, 405, 567, 630, 810, 945, 1134, 1890, 2835, 5670
- There is a total of 40 positive divisors.
- The sum of these divisors is 17424.
- The arithmetic mean is 435.6.
20 even divisors
2, 6, 10, 14, 18, 30, 42, 54, 70, 90, 126, 162, 210, 270, 378, 630, 810, 1134, 1890, 5670
20 odd divisors
1, 3, 5, 7, 9, 15, 21, 27, 35, 45, 63, 81, 105, 135, 189, 315, 405, 567, 945, 2835
How to compute the divisors of 5670?
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 5670 by each of the numbers from 1 to 5670 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 5670 / 1 = 5670 (the remainder is 0, so 1 is a divisor of 5670)
- 5670 / 2 = 2835 (the remainder is 0, so 2 is a divisor of 5670)
- 5670 / 3 = 1890 (the remainder is 0, so 3 is a divisor of 5670)
- ...
- 5670 / 5669 = 1.0001763979538 (the remainder is 1, so 5669 is not a divisor of 5670)
- 5670 / 5670 = 1 (the remainder is 0, so 5670 is a divisor of 5670)
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 5670 (i.e. 75.299402388067). 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 )
- 5670 / 1 = 5670 (the remainder is 0, so 1 and 5670 are divisors of 5670)
- 5670 / 2 = 2835 (the remainder is 0, so 2 and 2835 are divisors of 5670)
- 5670 / 3 = 1890 (the remainder is 0, so 3 and 1890 are divisors of 5670)
- ...
- 5670 / 74 = 76.621621621622 (the remainder is 46, so 74 is not a divisor of 5670)
- 5670 / 75 = 75.6 (the remainder is 45, so 75 is not a divisor of 5670)