What are the divisors of 1591?

1, 37, 43, 1591

4 odd divisors

1, 37, 43, 1591

How to compute the divisors of 1591?

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

  • 1591 / 1 = 1591 (the remainder is 0, so 1 is a divisor of 1591)
  • 1591 / 2 = 795.5 (the remainder is 1, so 2 is not a divisor of 1591)
  • 1591 / 3 = 530.33333333333 (the remainder is 1, so 3 is not a divisor of 1591)
  • ...
  • 1591 / 1590 = 1.0006289308176 (the remainder is 1, so 1590 is not a divisor of 1591)
  • 1591 / 1591 = 1 (the remainder is 0, so 1591 is a divisor of 1591)

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 1591 (i.e. 39.887341350358). 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 )

  • 1591 / 1 = 1591 (the remainder is 0, so 1 and 1591 are divisors of 1591)
  • 1591 / 2 = 795.5 (the remainder is 1, so 2 is not a divisor of 1591)
  • 1591 / 3 = 530.33333333333 (the remainder is 1, so 3 is not a divisor of 1591)
  • ...
  • 1591 / 38 = 41.868421052632 (the remainder is 33, so 38 is not a divisor of 1591)
  • 1591 / 39 = 40.794871794872 (the remainder is 31, so 39 is not a divisor of 1591)