What are the divisors of 9022?

1, 2, 13, 26, 347, 694, 4511, 9022

4 even divisors

2, 26, 694, 9022

4 odd divisors

1, 13, 347, 4511

How to compute the divisors of 9022?

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

  • 9022 / 1 = 9022 (the remainder is 0, so 1 is a divisor of 9022)
  • 9022 / 2 = 4511 (the remainder is 0, so 2 is a divisor of 9022)
  • 9022 / 3 = 3007.3333333333 (the remainder is 1, so 3 is not a divisor of 9022)
  • ...
  • 9022 / 9021 = 1.0001108524554 (the remainder is 1, so 9021 is not a divisor of 9022)
  • 9022 / 9022 = 1 (the remainder is 0, so 9022 is a divisor of 9022)

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 9022 (i.e. 94.984209213953). 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 )

  • 9022 / 1 = 9022 (the remainder is 0, so 1 and 9022 are divisors of 9022)
  • 9022 / 2 = 4511 (the remainder is 0, so 2 and 4511 are divisors of 9022)
  • 9022 / 3 = 3007.3333333333 (the remainder is 1, so 3 is not a divisor of 9022)
  • ...
  • 9022 / 93 = 97.010752688172 (the remainder is 1, so 93 is not a divisor of 9022)
  • 9022 / 94 = 95.978723404255 (the remainder is 92, so 94 is not a divisor of 9022)