What are the divisors of 2037?

1, 3, 7, 21, 97, 291, 679, 2037

8 odd divisors

1, 3, 7, 21, 97, 291, 679, 2037

How to compute the divisors of 2037?

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

  • 2037 / 1 = 2037 (the remainder is 0, so 1 is a divisor of 2037)
  • 2037 / 2 = 1018.5 (the remainder is 1, so 2 is not a divisor of 2037)
  • 2037 / 3 = 679 (the remainder is 0, so 3 is a divisor of 2037)
  • ...
  • 2037 / 2036 = 1.0004911591356 (the remainder is 1, so 2036 is not a divisor of 2037)
  • 2037 / 2037 = 1 (the remainder is 0, so 2037 is a divisor of 2037)

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 2037 (i.e. 45.133136385587). 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 )

  • 2037 / 1 = 2037 (the remainder is 0, so 1 and 2037 are divisors of 2037)
  • 2037 / 2 = 1018.5 (the remainder is 1, so 2 is not a divisor of 2037)
  • 2037 / 3 = 679 (the remainder is 0, so 3 and 679 are divisors of 2037)
  • ...
  • 2037 / 44 = 46.295454545455 (the remainder is 13, so 44 is not a divisor of 2037)
  • 2037 / 45 = 45.266666666667 (the remainder is 12, so 45 is not a divisor of 2037)