What are the divisors of 9144?

1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72, 127, 254, 381, 508, 762, 1016, 1143, 1524, 2286, 3048, 4572, 9144

18 even divisors

2, 4, 6, 8, 12, 18, 24, 36, 72, 254, 508, 762, 1016, 1524, 2286, 3048, 4572, 9144

6 odd divisors

1, 3, 9, 127, 381, 1143

How to compute the divisors of 9144?

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

  • 9144 / 1 = 9144 (the remainder is 0, so 1 is a divisor of 9144)
  • 9144 / 2 = 4572 (the remainder is 0, so 2 is a divisor of 9144)
  • 9144 / 3 = 3048 (the remainder is 0, so 3 is a divisor of 9144)
  • ...
  • 9144 / 9143 = 1.000109373291 (the remainder is 1, so 9143 is not a divisor of 9144)
  • 9144 / 9144 = 1 (the remainder is 0, so 9144 is a divisor of 9144)

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 9144 (i.e. 95.624264703055). 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 )

  • 9144 / 1 = 9144 (the remainder is 0, so 1 and 9144 are divisors of 9144)
  • 9144 / 2 = 4572 (the remainder is 0, so 2 and 4572 are divisors of 9144)
  • 9144 / 3 = 3048 (the remainder is 0, so 3 and 3048 are divisors of 9144)
  • ...
  • 9144 / 94 = 97.276595744681 (the remainder is 26, so 94 is not a divisor of 9144)
  • 9144 / 95 = 96.252631578947 (the remainder is 24, so 95 is not a divisor of 9144)