What are the divisors of 5280?

1, 2, 3, 4, 5, 6, 8, 10, 11, 12, 15, 16, 20, 22, 24, 30, 32, 33, 40, 44, 48, 55, 60, 66, 80, 88, 96, 110, 120, 132, 160, 165, 176, 220, 240, 264, 330, 352, 440, 480, 528, 660, 880, 1056, 1320, 1760, 2640, 5280

40 even divisors

2, 4, 6, 8, 10, 12, 16, 20, 22, 24, 30, 32, 40, 44, 48, 60, 66, 80, 88, 96, 110, 120, 132, 160, 176, 220, 240, 264, 330, 352, 440, 480, 528, 660, 880, 1056, 1320, 1760, 2640, 5280

8 odd divisors

1, 3, 5, 11, 15, 33, 55, 165

How to compute the divisors of 5280?

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

  • 5280 / 1 = 5280 (the remainder is 0, so 1 is a divisor of 5280)
  • 5280 / 2 = 2640 (the remainder is 0, so 2 is a divisor of 5280)
  • 5280 / 3 = 1760 (the remainder is 0, so 3 is a divisor of 5280)
  • ...
  • 5280 / 5279 = 1.0001894298163 (the remainder is 1, so 5279 is not a divisor of 5280)
  • 5280 / 5280 = 1 (the remainder is 0, so 5280 is a divisor of 5280)

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 5280 (i.e. 72.66360849834). 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 )

  • 5280 / 1 = 5280 (the remainder is 0, so 1 and 5280 are divisors of 5280)
  • 5280 / 2 = 2640 (the remainder is 0, so 2 and 2640 are divisors of 5280)
  • 5280 / 3 = 1760 (the remainder is 0, so 3 and 1760 are divisors of 5280)
  • ...
  • 5280 / 71 = 74.366197183099 (the remainder is 26, so 71 is not a divisor of 5280)
  • 5280 / 72 = 73.333333333333 (the remainder is 24, so 72 is not a divisor of 5280)