What are the divisors of 4101?

1, 3, 1367, 4101

4 odd divisors

1, 3, 1367, 4101

How to compute the divisors of 4101?

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

  • 4101 / 1 = 4101 (the remainder is 0, so 1 is a divisor of 4101)
  • 4101 / 2 = 2050.5 (the remainder is 1, so 2 is not a divisor of 4101)
  • 4101 / 3 = 1367 (the remainder is 0, so 3 is a divisor of 4101)
  • ...
  • 4101 / 4100 = 1.000243902439 (the remainder is 1, so 4100 is not a divisor of 4101)
  • 4101 / 4101 = 1 (the remainder is 0, so 4101 is a divisor of 4101)

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 4101 (i.e. 64.039050586341). 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 )

  • 4101 / 1 = 4101 (the remainder is 0, so 1 and 4101 are divisors of 4101)
  • 4101 / 2 = 2050.5 (the remainder is 1, so 2 is not a divisor of 4101)
  • 4101 / 3 = 1367 (the remainder is 0, so 3 and 1367 are divisors of 4101)
  • ...
  • 4101 / 63 = 65.095238095238 (the remainder is 6, so 63 is not a divisor of 4101)
  • 4101 / 64 = 64.078125 (the remainder is 5, so 64 is not a divisor of 4101)