What are the divisors of 5400?

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 25, 27, 30, 36, 40, 45, 50, 54, 60, 72, 75, 90, 100, 108, 120, 135, 150, 180, 200, 216, 225, 270, 300, 360, 450, 540, 600, 675, 900, 1080, 1350, 1800, 2700, 5400

36 even divisors

2, 4, 6, 8, 10, 12, 18, 20, 24, 30, 36, 40, 50, 54, 60, 72, 90, 100, 108, 120, 150, 180, 200, 216, 270, 300, 360, 450, 540, 600, 900, 1080, 1350, 1800, 2700, 5400

12 odd divisors

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

How to compute the divisors of 5400?

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

  • 5400 / 1 = 5400 (the remainder is 0, so 1 is a divisor of 5400)
  • 5400 / 2 = 2700 (the remainder is 0, so 2 is a divisor of 5400)
  • 5400 / 3 = 1800 (the remainder is 0, so 3 is a divisor of 5400)
  • ...
  • 5400 / 5399 = 1.0001852194851 (the remainder is 1, so 5399 is not a divisor of 5400)
  • 5400 / 5400 = 1 (the remainder is 0, so 5400 is a divisor of 5400)

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 5400 (i.e. 73.484692283495). 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 )

  • 5400 / 1 = 5400 (the remainder is 0, so 1 and 5400 are divisors of 5400)
  • 5400 / 2 = 2700 (the remainder is 0, so 2 and 2700 are divisors of 5400)
  • 5400 / 3 = 1800 (the remainder is 0, so 3 and 1800 are divisors of 5400)
  • ...
  • 5400 / 72 = 75 (the remainder is 0, so 72 and 75 are divisors of 5400)
  • 5400 / 73 = 73.972602739726 (the remainder is 71, so 73 is not a divisor of 5400)