What are the divisors of 1644?

1, 2, 3, 4, 6, 12, 137, 274, 411, 548, 822, 1644

8 even divisors

2, 4, 6, 12, 274, 548, 822, 1644

4 odd divisors

1, 3, 137, 411

How to compute the divisors of 1644?

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

  • 1644 / 1 = 1644 (the remainder is 0, so 1 is a divisor of 1644)
  • 1644 / 2 = 822 (the remainder is 0, so 2 is a divisor of 1644)
  • 1644 / 3 = 548 (the remainder is 0, so 3 is a divisor of 1644)
  • ...
  • 1644 / 1643 = 1.0006086427267 (the remainder is 1, so 1643 is not a divisor of 1644)
  • 1644 / 1644 = 1 (the remainder is 0, so 1644 is a divisor of 1644)

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 1644 (i.e. 40.546269865427). 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 )

  • 1644 / 1 = 1644 (the remainder is 0, so 1 and 1644 are divisors of 1644)
  • 1644 / 2 = 822 (the remainder is 0, so 2 and 822 are divisors of 1644)
  • 1644 / 3 = 548 (the remainder is 0, so 3 and 548 are divisors of 1644)
  • ...
  • 1644 / 39 = 42.153846153846 (the remainder is 6, so 39 is not a divisor of 1644)
  • 1644 / 40 = 41.1 (the remainder is 4, so 40 is not a divisor of 1644)