What are the divisors of 9054?

1, 2, 3, 6, 9, 18, 503, 1006, 1509, 3018, 4527, 9054

6 even divisors

2, 6, 18, 1006, 3018, 9054

6 odd divisors

1, 3, 9, 503, 1509, 4527

How to compute the divisors of 9054?

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

  • 9054 / 1 = 9054 (the remainder is 0, so 1 is a divisor of 9054)
  • 9054 / 2 = 4527 (the remainder is 0, so 2 is a divisor of 9054)
  • 9054 / 3 = 3018 (the remainder is 0, so 3 is a divisor of 9054)
  • ...
  • 9054 / 9053 = 1.0001104606208 (the remainder is 1, so 9053 is not a divisor of 9054)
  • 9054 / 9054 = 1 (the remainder is 0, so 9054 is a divisor of 9054)

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 9054 (i.e. 95.152509162922). 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 )

  • 9054 / 1 = 9054 (the remainder is 0, so 1 and 9054 are divisors of 9054)
  • 9054 / 2 = 4527 (the remainder is 0, so 2 and 4527 are divisors of 9054)
  • 9054 / 3 = 3018 (the remainder is 0, so 3 and 3018 are divisors of 9054)
  • ...
  • 9054 / 94 = 96.31914893617 (the remainder is 30, so 94 is not a divisor of 9054)
  • 9054 / 95 = 95.305263157895 (the remainder is 29, so 95 is not a divisor of 9054)