What are the divisors of 2226?

1, 2, 3, 6, 7, 14, 21, 42, 53, 106, 159, 318, 371, 742, 1113, 2226

8 even divisors

2, 6, 14, 42, 106, 318, 742, 2226

8 odd divisors

1, 3, 7, 21, 53, 159, 371, 1113

How to compute the divisors of 2226?

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

  • 2226 / 1 = 2226 (the remainder is 0, so 1 is a divisor of 2226)
  • 2226 / 2 = 1113 (the remainder is 0, so 2 is a divisor of 2226)
  • 2226 / 3 = 742 (the remainder is 0, so 3 is a divisor of 2226)
  • ...
  • 2226 / 2225 = 1.0004494382022 (the remainder is 1, so 2225 is not a divisor of 2226)
  • 2226 / 2226 = 1 (the remainder is 0, so 2226 is a divisor of 2226)

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 2226 (i.e. 47.180504448342). 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 )

  • 2226 / 1 = 2226 (the remainder is 0, so 1 and 2226 are divisors of 2226)
  • 2226 / 2 = 1113 (the remainder is 0, so 2 and 1113 are divisors of 2226)
  • 2226 / 3 = 742 (the remainder is 0, so 3 and 742 are divisors of 2226)
  • ...
  • 2226 / 46 = 48.391304347826 (the remainder is 18, so 46 is not a divisor of 2226)
  • 2226 / 47 = 47.36170212766 (the remainder is 17, so 47 is not a divisor of 2226)