What are the divisors of 3972?

1, 2, 3, 4, 6, 12, 331, 662, 993, 1324, 1986, 3972

8 even divisors

2, 4, 6, 12, 662, 1324, 1986, 3972

4 odd divisors

1, 3, 331, 993

How to compute the divisors of 3972?

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

  • 3972 / 1 = 3972 (the remainder is 0, so 1 is a divisor of 3972)
  • 3972 / 2 = 1986 (the remainder is 0, so 2 is a divisor of 3972)
  • 3972 / 3 = 1324 (the remainder is 0, so 3 is a divisor of 3972)
  • ...
  • 3972 / 3971 = 1.0002518257366 (the remainder is 1, so 3971 is not a divisor of 3972)
  • 3972 / 3972 = 1 (the remainder is 0, so 3972 is a divisor of 3972)

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 3972 (i.e. 63.023805026355). 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 )

  • 3972 / 1 = 3972 (the remainder is 0, so 1 and 3972 are divisors of 3972)
  • 3972 / 2 = 1986 (the remainder is 0, so 2 and 1986 are divisors of 3972)
  • 3972 / 3 = 1324 (the remainder is 0, so 3 and 1324 are divisors of 3972)
  • ...
  • 3972 / 62 = 64.064516129032 (the remainder is 4, so 62 is not a divisor of 3972)
  • 3972 / 63 = 63.047619047619 (the remainder is 3, so 63 is not a divisor of 3972)