What are the divisors of 4320?

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 27, 30, 32, 36, 40, 45, 48, 54, 60, 72, 80, 90, 96, 108, 120, 135, 144, 160, 180, 216, 240, 270, 288, 360, 432, 480, 540, 720, 864, 1080, 1440, 2160, 4320

40 even divisors

2, 4, 6, 8, 10, 12, 16, 18, 20, 24, 30, 32, 36, 40, 48, 54, 60, 72, 80, 90, 96, 108, 120, 144, 160, 180, 216, 240, 270, 288, 360, 432, 480, 540, 720, 864, 1080, 1440, 2160, 4320

8 odd divisors

1, 3, 5, 9, 15, 27, 45, 135

How to compute the divisors of 4320?

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

  • 4320 / 1 = 4320 (the remainder is 0, so 1 is a divisor of 4320)
  • 4320 / 2 = 2160 (the remainder is 0, so 2 is a divisor of 4320)
  • 4320 / 3 = 1440 (the remainder is 0, so 3 is a divisor of 4320)
  • ...
  • 4320 / 4319 = 1.0002315350776 (the remainder is 1, so 4319 is not a divisor of 4320)
  • 4320 / 4320 = 1 (the remainder is 0, so 4320 is a divisor of 4320)

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 4320 (i.e. 65.72670690062). 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 )

  • 4320 / 1 = 4320 (the remainder is 0, so 1 and 4320 are divisors of 4320)
  • 4320 / 2 = 2160 (the remainder is 0, so 2 and 2160 are divisors of 4320)
  • 4320 / 3 = 1440 (the remainder is 0, so 3 and 1440 are divisors of 4320)
  • ...
  • 4320 / 64 = 67.5 (the remainder is 32, so 64 is not a divisor of 4320)
  • 4320 / 65 = 66.461538461538 (the remainder is 30, so 65 is not a divisor of 4320)