What are the divisors of 1884?

1, 2, 3, 4, 6, 12, 157, 314, 471, 628, 942, 1884

8 even divisors

2, 4, 6, 12, 314, 628, 942, 1884

4 odd divisors

1, 3, 157, 471

How to compute the divisors of 1884?

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

  • 1884 / 1 = 1884 (the remainder is 0, so 1 is a divisor of 1884)
  • 1884 / 2 = 942 (the remainder is 0, so 2 is a divisor of 1884)
  • 1884 / 3 = 628 (the remainder is 0, so 3 is a divisor of 1884)
  • ...
  • 1884 / 1883 = 1.0005310674456 (the remainder is 1, so 1883 is not a divisor of 1884)
  • 1884 / 1884 = 1 (the remainder is 0, so 1884 is a divisor of 1884)

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 1884 (i.e. 43.405068828421). 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 )

  • 1884 / 1 = 1884 (the remainder is 0, so 1 and 1884 are divisors of 1884)
  • 1884 / 2 = 942 (the remainder is 0, so 2 and 942 are divisors of 1884)
  • 1884 / 3 = 628 (the remainder is 0, so 3 and 628 are divisors of 1884)
  • ...
  • 1884 / 42 = 44.857142857143 (the remainder is 36, so 42 is not a divisor of 1884)
  • 1884 / 43 = 43.813953488372 (the remainder is 35, so 43 is not a divisor of 1884)