What are the divisors of 5810?

1, 2, 5, 7, 10, 14, 35, 70, 83, 166, 415, 581, 830, 1162, 2905, 5810

8 even divisors

2, 10, 14, 70, 166, 830, 1162, 5810

8 odd divisors

1, 5, 7, 35, 83, 415, 581, 2905

How to compute the divisors of 5810?

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

  • 5810 / 1 = 5810 (the remainder is 0, so 1 is a divisor of 5810)
  • 5810 / 2 = 2905 (the remainder is 0, so 2 is a divisor of 5810)
  • 5810 / 3 = 1936.6666666667 (the remainder is 2, so 3 is not a divisor of 5810)
  • ...
  • 5810 / 5809 = 1.000172146669 (the remainder is 1, so 5809 is not a divisor of 5810)
  • 5810 / 5810 = 1 (the remainder is 0, so 5810 is a divisor of 5810)

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 5810 (i.e. 76.223356000638). 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 )

  • 5810 / 1 = 5810 (the remainder is 0, so 1 and 5810 are divisors of 5810)
  • 5810 / 2 = 2905 (the remainder is 0, so 2 and 2905 are divisors of 5810)
  • 5810 / 3 = 1936.6666666667 (the remainder is 2, so 3 is not a divisor of 5810)
  • ...
  • 5810 / 75 = 77.466666666667 (the remainder is 35, so 75 is not a divisor of 5810)
  • 5810 / 76 = 76.447368421053 (the remainder is 34, so 76 is not a divisor of 5810)