What are the divisors of 9126?

1, 2, 3, 6, 9, 13, 18, 26, 27, 39, 54, 78, 117, 169, 234, 338, 351, 507, 702, 1014, 1521, 3042, 4563, 9126

12 even divisors

2, 6, 18, 26, 54, 78, 234, 338, 702, 1014, 3042, 9126

12 odd divisors

1, 3, 9, 13, 27, 39, 117, 169, 351, 507, 1521, 4563

How to compute the divisors of 9126?

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

  • 9126 / 1 = 9126 (the remainder is 0, so 1 is a divisor of 9126)
  • 9126 / 2 = 4563 (the remainder is 0, so 2 is a divisor of 9126)
  • 9126 / 3 = 3042 (the remainder is 0, so 3 is a divisor of 9126)
  • ...
  • 9126 / 9125 = 1.0001095890411 (the remainder is 1, so 9125 is not a divisor of 9126)
  • 9126 / 9126 = 1 (the remainder is 0, so 9126 is a divisor of 9126)

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 9126 (i.e. 95.530099968544). 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 )

  • 9126 / 1 = 9126 (the remainder is 0, so 1 and 9126 are divisors of 9126)
  • 9126 / 2 = 4563 (the remainder is 0, so 2 and 4563 are divisors of 9126)
  • 9126 / 3 = 3042 (the remainder is 0, so 3 and 3042 are divisors of 9126)
  • ...
  • 9126 / 94 = 97.085106382979 (the remainder is 8, so 94 is not a divisor of 9126)
  • 9126 / 95 = 96.063157894737 (the remainder is 6, so 95 is not a divisor of 9126)