What are the divisors of 5900?

1, 2, 4, 5, 10, 20, 25, 50, 59, 100, 118, 236, 295, 590, 1180, 1475, 2950, 5900

12 even divisors

2, 4, 10, 20, 50, 100, 118, 236, 590, 1180, 2950, 5900

6 odd divisors

1, 5, 25, 59, 295, 1475

How to compute the divisors of 5900?

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

  • 5900 / 1 = 5900 (the remainder is 0, so 1 is a divisor of 5900)
  • 5900 / 2 = 2950 (the remainder is 0, so 2 is a divisor of 5900)
  • 5900 / 3 = 1966.6666666667 (the remainder is 2, so 3 is not a divisor of 5900)
  • ...
  • 5900 / 5899 = 1.0001695202577 (the remainder is 1, so 5899 is not a divisor of 5900)
  • 5900 / 5900 = 1 (the remainder is 0, so 5900 is a divisor of 5900)

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 5900 (i.e. 76.811457478686). 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 )

  • 5900 / 1 = 5900 (the remainder is 0, so 1 and 5900 are divisors of 5900)
  • 5900 / 2 = 2950 (the remainder is 0, so 2 and 2950 are divisors of 5900)
  • 5900 / 3 = 1966.6666666667 (the remainder is 2, so 3 is not a divisor of 5900)
  • ...
  • 5900 / 75 = 78.666666666667 (the remainder is 50, so 75 is not a divisor of 5900)
  • 5900 / 76 = 77.631578947368 (the remainder is 48, so 76 is not a divisor of 5900)