What are the divisors of 2180?

1, 2, 4, 5, 10, 20, 109, 218, 436, 545, 1090, 2180

8 even divisors

2, 4, 10, 20, 218, 436, 1090, 2180

4 odd divisors

1, 5, 109, 545

How to compute the divisors of 2180?

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.

N mod M = 0

Brute force algorithm

We could start by using a brute-force method which would involve dividing 2180 by each of the numbers from 1 to 2180 to determine which ones have a remainder equal to 0.

Remainder = N ( M × N M )

(where N M is the integer part of the quotient)

  • 2180 / 1 = 2180 (the remainder is 0, so 1 is a divisor of 2180)
  • 2180 / 2 = 1090 (the remainder is 0, so 2 is a divisor of 2180)
  • 2180 / 3 = 726.66666666667 (the remainder is 2, so 3 is not a divisor of 2180)
  • ...
  • 2180 / 2179 = 1.0004589261129 (the remainder is 1, so 2179 is not a divisor of 2180)
  • 2180 / 2180 = 1 (the remainder is 0, so 2180 is a divisor of 2180)

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 2180 (i.e. 46.690470119715). Indeed, if a number N has a divisor D greater than its square root, then there is necessarily a smaller divisor d such that:

D × d = N

(thus, if N D = d , then N d = D )

  • 2180 / 1 = 2180 (the remainder is 0, so 1 and 2180 are divisors of 2180)
  • 2180 / 2 = 1090 (the remainder is 0, so 2 and 1090 are divisors of 2180)
  • 2180 / 3 = 726.66666666667 (the remainder is 2, so 3 is not a divisor of 2180)
  • ...
  • 2180 / 45 = 48.444444444444 (the remainder is 20, so 45 is not a divisor of 2180)
  • 2180 / 46 = 47.391304347826 (the remainder is 18, so 46 is not a divisor of 2180)