What are the divisors of 1992?

1, 2, 3, 4, 6, 8, 12, 24, 83, 166, 249, 332, 498, 664, 996, 1992

12 even divisors

2, 4, 6, 8, 12, 24, 166, 332, 498, 664, 996, 1992

4 odd divisors

1, 3, 83, 249

How to compute the divisors of 1992?

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

  • 1992 / 1 = 1992 (the remainder is 0, so 1 is a divisor of 1992)
  • 1992 / 2 = 996 (the remainder is 0, so 2 is a divisor of 1992)
  • 1992 / 3 = 664 (the remainder is 0, so 3 is a divisor of 1992)
  • ...
  • 1992 / 1991 = 1.0005022601708 (the remainder is 1, so 1991 is not a divisor of 1992)
  • 1992 / 1992 = 1 (the remainder is 0, so 1992 is a divisor of 1992)

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 1992 (i.e. 44.631827208843). 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 )

  • 1992 / 1 = 1992 (the remainder is 0, so 1 and 1992 are divisors of 1992)
  • 1992 / 2 = 996 (the remainder is 0, so 2 and 996 are divisors of 1992)
  • 1992 / 3 = 664 (the remainder is 0, so 3 and 664 are divisors of 1992)
  • ...
  • 1992 / 43 = 46.325581395349 (the remainder is 14, so 43 is not a divisor of 1992)
  • 1992 / 44 = 45.272727272727 (the remainder is 12, so 44 is not a divisor of 1992)