What are the divisors of 9036?

1, 2, 3, 4, 6, 9, 12, 18, 36, 251, 502, 753, 1004, 1506, 2259, 3012, 4518, 9036

12 even divisors

2, 4, 6, 12, 18, 36, 502, 1004, 1506, 3012, 4518, 9036

6 odd divisors

1, 3, 9, 251, 753, 2259

How to compute the divisors of 9036?

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

  • 9036 / 1 = 9036 (the remainder is 0, so 1 is a divisor of 9036)
  • 9036 / 2 = 4518 (the remainder is 0, so 2 is a divisor of 9036)
  • 9036 / 3 = 3012 (the remainder is 0, so 3 is a divisor of 9036)
  • ...
  • 9036 / 9035 = 1.0001106806862 (the remainder is 1, so 9035 is not a divisor of 9036)
  • 9036 / 9036 = 1 (the remainder is 0, so 9036 is a divisor of 9036)

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 9036 (i.e. 95.057877106529). 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 )

  • 9036 / 1 = 9036 (the remainder is 0, so 1 and 9036 are divisors of 9036)
  • 9036 / 2 = 4518 (the remainder is 0, so 2 and 4518 are divisors of 9036)
  • 9036 / 3 = 3012 (the remainder is 0, so 3 and 3012 are divisors of 9036)
  • ...
  • 9036 / 94 = 96.127659574468 (the remainder is 12, so 94 is not a divisor of 9036)
  • 9036 / 95 = 95.115789473684 (the remainder is 11, so 95 is not a divisor of 9036)