What are the divisors of 5310?

1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 45, 59, 90, 118, 177, 295, 354, 531, 590, 885, 1062, 1770, 2655, 5310

12 even divisors

2, 6, 10, 18, 30, 90, 118, 354, 590, 1062, 1770, 5310

12 odd divisors

1, 3, 5, 9, 15, 45, 59, 177, 295, 531, 885, 2655

How to compute the divisors of 5310?

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

  • 5310 / 1 = 5310 (the remainder is 0, so 1 is a divisor of 5310)
  • 5310 / 2 = 2655 (the remainder is 0, so 2 is a divisor of 5310)
  • 5310 / 3 = 1770 (the remainder is 0, so 3 is a divisor of 5310)
  • ...
  • 5310 / 5309 = 1.0001883593897 (the remainder is 1, so 5309 is not a divisor of 5310)
  • 5310 / 5310 = 1 (the remainder is 0, so 5310 is a divisor of 5310)

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 5310 (i.e. 72.869746808947). 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 )

  • 5310 / 1 = 5310 (the remainder is 0, so 1 and 5310 are divisors of 5310)
  • 5310 / 2 = 2655 (the remainder is 0, so 2 and 2655 are divisors of 5310)
  • 5310 / 3 = 1770 (the remainder is 0, so 3 and 1770 are divisors of 5310)
  • ...
  • 5310 / 71 = 74.788732394366 (the remainder is 56, so 71 is not a divisor of 5310)
  • 5310 / 72 = 73.75 (the remainder is 54, so 72 is not a divisor of 5310)