What are the divisors of 2700?

1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 25, 27, 30, 36, 45, 50, 54, 60, 75, 90, 100, 108, 135, 150, 180, 225, 270, 300, 450, 540, 675, 900, 1350, 2700

24 even divisors

2, 4, 6, 10, 12, 18, 20, 30, 36, 50, 54, 60, 90, 100, 108, 150, 180, 270, 300, 450, 540, 900, 1350, 2700

12 odd divisors

1, 3, 5, 9, 15, 25, 27, 45, 75, 135, 225, 675

How to compute the divisors of 2700?

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

  • 2700 / 1 = 2700 (the remainder is 0, so 1 is a divisor of 2700)
  • 2700 / 2 = 1350 (the remainder is 0, so 2 is a divisor of 2700)
  • 2700 / 3 = 900 (the remainder is 0, so 3 is a divisor of 2700)
  • ...
  • 2700 / 2699 = 1.0003705075954 (the remainder is 1, so 2699 is not a divisor of 2700)
  • 2700 / 2700 = 1 (the remainder is 0, so 2700 is a divisor of 2700)

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 2700 (i.e. 51.961524227066). 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 )

  • 2700 / 1 = 2700 (the remainder is 0, so 1 and 2700 are divisors of 2700)
  • 2700 / 2 = 1350 (the remainder is 0, so 2 and 1350 are divisors of 2700)
  • 2700 / 3 = 900 (the remainder is 0, so 3 and 900 are divisors of 2700)
  • ...
  • 2700 / 50 = 54 (the remainder is 0, so 50 and 54 are divisors of 2700)
  • 2700 / 51 = 52.941176470588 (the remainder is 48, so 51 is not a divisor of 2700)