What are the divisors of 2100?

1, 2, 3, 4, 5, 6, 7, 10, 12, 14, 15, 20, 21, 25, 28, 30, 35, 42, 50, 60, 70, 75, 84, 100, 105, 140, 150, 175, 210, 300, 350, 420, 525, 700, 1050, 2100

24 even divisors

2, 4, 6, 10, 12, 14, 20, 28, 30, 42, 50, 60, 70, 84, 100, 140, 150, 210, 300, 350, 420, 700, 1050, 2100

12 odd divisors

1, 3, 5, 7, 15, 21, 25, 35, 75, 105, 175, 525

How to compute the divisors of 2100?

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 2100 by each of the numbers from 1 to 2100 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)

  • 2100 / 1 = 2100 (the remainder is 0, so 1 is a divisor of 2100)
  • 2100 / 2 = 1050 (the remainder is 0, so 2 is a divisor of 2100)
  • 2100 / 3 = 700 (the remainder is 0, so 3 is a divisor of 2100)
  • ...
  • 2100 / 2099 = 1.0004764173416 (the remainder is 1, so 2099 is not a divisor of 2100)
  • 2100 / 2100 = 1 (the remainder is 0, so 2100 is a divisor of 2100)

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 2100 (i.e. 45.825756949558). 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 )

  • 2100 / 1 = 2100 (the remainder is 0, so 1 and 2100 are divisors of 2100)
  • 2100 / 2 = 1050 (the remainder is 0, so 2 and 1050 are divisors of 2100)
  • 2100 / 3 = 700 (the remainder is 0, so 3 and 700 are divisors of 2100)
  • ...
  • 2100 / 44 = 47.727272727273 (the remainder is 32, so 44 is not a divisor of 2100)
  • 2100 / 45 = 46.666666666667 (the remainder is 30, so 45 is not a divisor of 2100)