What are the divisors of 3168?

1, 2, 3, 4, 6, 8, 9, 11, 12, 16, 18, 22, 24, 32, 33, 36, 44, 48, 66, 72, 88, 96, 99, 132, 144, 176, 198, 264, 288, 352, 396, 528, 792, 1056, 1584, 3168

30 even divisors

2, 4, 6, 8, 12, 16, 18, 22, 24, 32, 36, 44, 48, 66, 72, 88, 96, 132, 144, 176, 198, 264, 288, 352, 396, 528, 792, 1056, 1584, 3168

6 odd divisors

1, 3, 9, 11, 33, 99

How to compute the divisors of 3168?

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

  • 3168 / 1 = 3168 (the remainder is 0, so 1 is a divisor of 3168)
  • 3168 / 2 = 1584 (the remainder is 0, so 2 is a divisor of 3168)
  • 3168 / 3 = 1056 (the remainder is 0, so 3 is a divisor of 3168)
  • ...
  • 3168 / 3167 = 1.0003157562362 (the remainder is 1, so 3167 is not a divisor of 3168)
  • 3168 / 3168 = 1 (the remainder is 0, so 3168 is a divisor of 3168)

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 3168 (i.e. 56.284989117881). 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 )

  • 3168 / 1 = 3168 (the remainder is 0, so 1 and 3168 are divisors of 3168)
  • 3168 / 2 = 1584 (the remainder is 0, so 2 and 1584 are divisors of 3168)
  • 3168 / 3 = 1056 (the remainder is 0, so 3 and 1056 are divisors of 3168)
  • ...
  • 3168 / 55 = 57.6 (the remainder is 33, so 55 is not a divisor of 3168)
  • 3168 / 56 = 56.571428571429 (the remainder is 32, so 56 is not a divisor of 3168)