What are the divisors of 3234?

1, 2, 3, 6, 7, 11, 14, 21, 22, 33, 42, 49, 66, 77, 98, 147, 154, 231, 294, 462, 539, 1078, 1617, 3234

12 even divisors

2, 6, 14, 22, 42, 66, 98, 154, 294, 462, 1078, 3234

12 odd divisors

1, 3, 7, 11, 21, 33, 49, 77, 147, 231, 539, 1617

How to compute the divisors of 3234?

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

  • 3234 / 1 = 3234 (the remainder is 0, so 1 is a divisor of 3234)
  • 3234 / 2 = 1617 (the remainder is 0, so 2 is a divisor of 3234)
  • 3234 / 3 = 1078 (the remainder is 0, so 3 is a divisor of 3234)
  • ...
  • 3234 / 3233 = 1.0003093102382 (the remainder is 1, so 3233 is not a divisor of 3234)
  • 3234 / 3234 = 1 (the remainder is 0, so 3234 is a divisor of 3234)

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 3234 (i.e. 56.868268832452). 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 )

  • 3234 / 1 = 3234 (the remainder is 0, so 1 and 3234 are divisors of 3234)
  • 3234 / 2 = 1617 (the remainder is 0, so 2 and 1617 are divisors of 3234)
  • 3234 / 3 = 1078 (the remainder is 0, so 3 and 1078 are divisors of 3234)
  • ...
  • 3234 / 55 = 58.8 (the remainder is 44, so 55 is not a divisor of 3234)
  • 3234 / 56 = 57.75 (the remainder is 42, so 56 is not a divisor of 3234)