What are the divisors of 4251?

1, 3, 13, 39, 109, 327, 1417, 4251

8 odd divisors

1, 3, 13, 39, 109, 327, 1417, 4251

How to compute the divisors of 4251?

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

  • 4251 / 1 = 4251 (the remainder is 0, so 1 is a divisor of 4251)
  • 4251 / 2 = 2125.5 (the remainder is 1, so 2 is not a divisor of 4251)
  • 4251 / 3 = 1417 (the remainder is 0, so 3 is a divisor of 4251)
  • ...
  • 4251 / 4250 = 1.0002352941176 (the remainder is 1, so 4250 is not a divisor of 4251)
  • 4251 / 4251 = 1 (the remainder is 0, so 4251 is a divisor of 4251)

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 4251 (i.e. 65.199693250812). 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 )

  • 4251 / 1 = 4251 (the remainder is 0, so 1 and 4251 are divisors of 4251)
  • 4251 / 2 = 2125.5 (the remainder is 1, so 2 is not a divisor of 4251)
  • 4251 / 3 = 1417 (the remainder is 0, so 3 and 1417 are divisors of 4251)
  • ...
  • 4251 / 64 = 66.421875 (the remainder is 27, so 64 is not a divisor of 4251)
  • 4251 / 65 = 65.4 (the remainder is 26, so 65 is not a divisor of 4251)