What are the divisors of 9108?

1, 2, 3, 4, 6, 9, 11, 12, 18, 22, 23, 33, 36, 44, 46, 66, 69, 92, 99, 132, 138, 198, 207, 253, 276, 396, 414, 506, 759, 828, 1012, 1518, 2277, 3036, 4554, 9108

24 even divisors

2, 4, 6, 12, 18, 22, 36, 44, 46, 66, 92, 132, 138, 198, 276, 396, 414, 506, 828, 1012, 1518, 3036, 4554, 9108

12 odd divisors

1, 3, 9, 11, 23, 33, 69, 99, 207, 253, 759, 2277

How to compute the divisors of 9108?

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

  • 9108 / 1 = 9108 (the remainder is 0, so 1 is a divisor of 9108)
  • 9108 / 2 = 4554 (the remainder is 0, so 2 is a divisor of 9108)
  • 9108 / 3 = 3036 (the remainder is 0, so 3 is a divisor of 9108)
  • ...
  • 9108 / 9107 = 1.000109805644 (the remainder is 1, so 9107 is not a divisor of 9108)
  • 9108 / 9108 = 1 (the remainder is 0, so 9108 is a divisor of 9108)

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 9108 (i.e. 95.435842323521). 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 )

  • 9108 / 1 = 9108 (the remainder is 0, so 1 and 9108 are divisors of 9108)
  • 9108 / 2 = 4554 (the remainder is 0, so 2 and 4554 are divisors of 9108)
  • 9108 / 3 = 3036 (the remainder is 0, so 3 and 3036 are divisors of 9108)
  • ...
  • 9108 / 94 = 96.893617021277 (the remainder is 84, so 94 is not a divisor of 9108)
  • 9108 / 95 = 95.873684210526 (the remainder is 83, so 95 is not a divisor of 9108)