What are the divisors of 1944?

1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 27, 36, 54, 72, 81, 108, 162, 216, 243, 324, 486, 648, 972, 1944

18 even divisors

2, 4, 6, 8, 12, 18, 24, 36, 54, 72, 108, 162, 216, 324, 486, 648, 972, 1944

6 odd divisors

1, 3, 9, 27, 81, 243

How to compute the divisors of 1944?

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

  • 1944 / 1 = 1944 (the remainder is 0, so 1 is a divisor of 1944)
  • 1944 / 2 = 972 (the remainder is 0, so 2 is a divisor of 1944)
  • 1944 / 3 = 648 (the remainder is 0, so 3 is a divisor of 1944)
  • ...
  • 1944 / 1943 = 1.0005146680391 (the remainder is 1, so 1943 is not a divisor of 1944)
  • 1944 / 1944 = 1 (the remainder is 0, so 1944 is a divisor of 1944)

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 1944 (i.e. 44.090815370097). 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 )

  • 1944 / 1 = 1944 (the remainder is 0, so 1 and 1944 are divisors of 1944)
  • 1944 / 2 = 972 (the remainder is 0, so 2 and 972 are divisors of 1944)
  • 1944 / 3 = 648 (the remainder is 0, so 3 and 648 are divisors of 1944)
  • ...
  • 1944 / 43 = 45.209302325581 (the remainder is 9, so 43 is not a divisor of 1944)
  • 1944 / 44 = 44.181818181818 (the remainder is 8, so 44 is not a divisor of 1944)