What are the divisors of 2230?

1, 2, 5, 10, 223, 446, 1115, 2230

4 even divisors

2, 10, 446, 2230

4 odd divisors

1, 5, 223, 1115

How to compute the divisors of 2230?

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

  • 2230 / 1 = 2230 (the remainder is 0, so 1 is a divisor of 2230)
  • 2230 / 2 = 1115 (the remainder is 0, so 2 is a divisor of 2230)
  • 2230 / 3 = 743.33333333333 (the remainder is 1, so 3 is not a divisor of 2230)
  • ...
  • 2230 / 2229 = 1.0004486316734 (the remainder is 1, so 2229 is not a divisor of 2230)
  • 2230 / 2230 = 1 (the remainder is 0, so 2230 is a divisor of 2230)

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 2230 (i.e. 47.22287581247). 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 )

  • 2230 / 1 = 2230 (the remainder is 0, so 1 and 2230 are divisors of 2230)
  • 2230 / 2 = 1115 (the remainder is 0, so 2 and 1115 are divisors of 2230)
  • 2230 / 3 = 743.33333333333 (the remainder is 1, so 3 is not a divisor of 2230)
  • ...
  • 2230 / 46 = 48.478260869565 (the remainder is 22, so 46 is not a divisor of 2230)
  • 2230 / 47 = 47.446808510638 (the remainder is 21, so 47 is not a divisor of 2230)