What are the divisors of 2391?

1, 3, 797, 2391

4 odd divisors

1, 3, 797, 2391

How to compute the divisors of 2391?

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

  • 2391 / 1 = 2391 (the remainder is 0, so 1 is a divisor of 2391)
  • 2391 / 2 = 1195.5 (the remainder is 1, so 2 is not a divisor of 2391)
  • 2391 / 3 = 797 (the remainder is 0, so 3 is a divisor of 2391)
  • ...
  • 2391 / 2390 = 1.0004184100418 (the remainder is 1, so 2390 is not a divisor of 2391)
  • 2391 / 2391 = 1 (the remainder is 0, so 2391 is a divisor of 2391)

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 2391 (i.e. 48.897852713591). 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 )

  • 2391 / 1 = 2391 (the remainder is 0, so 1 and 2391 are divisors of 2391)
  • 2391 / 2 = 1195.5 (the remainder is 1, so 2 is not a divisor of 2391)
  • 2391 / 3 = 797 (the remainder is 0, so 3 and 797 are divisors of 2391)
  • ...
  • 2391 / 47 = 50.872340425532 (the remainder is 41, so 47 is not a divisor of 2391)
  • 2391 / 48 = 49.8125 (the remainder is 39, so 48 is not a divisor of 2391)