What are the divisors of 4560?

1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 16, 19, 20, 24, 30, 38, 40, 48, 57, 60, 76, 80, 95, 114, 120, 152, 190, 228, 240, 285, 304, 380, 456, 570, 760, 912, 1140, 1520, 2280, 4560

32 even divisors

2, 4, 6, 8, 10, 12, 16, 20, 24, 30, 38, 40, 48, 60, 76, 80, 114, 120, 152, 190, 228, 240, 304, 380, 456, 570, 760, 912, 1140, 1520, 2280, 4560

8 odd divisors

1, 3, 5, 15, 19, 57, 95, 285

How to compute the divisors of 4560?

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

  • 4560 / 1 = 4560 (the remainder is 0, so 1 is a divisor of 4560)
  • 4560 / 2 = 2280 (the remainder is 0, so 2 is a divisor of 4560)
  • 4560 / 3 = 1520 (the remainder is 0, so 3 is a divisor of 4560)
  • ...
  • 4560 / 4559 = 1.0002193463479 (the remainder is 1, so 4559 is not a divisor of 4560)
  • 4560 / 4560 = 1 (the remainder is 0, so 4560 is a divisor of 4560)

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 4560 (i.e. 67.527772064537). 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 )

  • 4560 / 1 = 4560 (the remainder is 0, so 1 and 4560 are divisors of 4560)
  • 4560 / 2 = 2280 (the remainder is 0, so 2 and 2280 are divisors of 4560)
  • 4560 / 3 = 1520 (the remainder is 0, so 3 and 1520 are divisors of 4560)
  • ...
  • 4560 / 66 = 69.090909090909 (the remainder is 6, so 66 is not a divisor of 4560)
  • 4560 / 67 = 68.059701492537 (the remainder is 4, so 67 is not a divisor of 4560)