What are the divisors of 5850?

1, 2, 3, 5, 6, 9, 10, 13, 15, 18, 25, 26, 30, 39, 45, 50, 65, 75, 78, 90, 117, 130, 150, 195, 225, 234, 325, 390, 450, 585, 650, 975, 1170, 1950, 2925, 5850

18 even divisors

2, 6, 10, 18, 26, 30, 50, 78, 90, 130, 150, 234, 390, 450, 650, 1170, 1950, 5850

18 odd divisors

1, 3, 5, 9, 13, 15, 25, 39, 45, 65, 75, 117, 195, 225, 325, 585, 975, 2925

How to compute the divisors of 5850?

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

  • 5850 / 1 = 5850 (the remainder is 0, so 1 is a divisor of 5850)
  • 5850 / 2 = 2925 (the remainder is 0, so 2 is a divisor of 5850)
  • 5850 / 3 = 1950 (the remainder is 0, so 3 is a divisor of 5850)
  • ...
  • 5850 / 5849 = 1.0001709693965 (the remainder is 1, so 5849 is not a divisor of 5850)
  • 5850 / 5850 = 1 (the remainder is 0, so 5850 is a divisor of 5850)

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 5850 (i.e. 76.485292703892). 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 )

  • 5850 / 1 = 5850 (the remainder is 0, so 1 and 5850 are divisors of 5850)
  • 5850 / 2 = 2925 (the remainder is 0, so 2 and 2925 are divisors of 5850)
  • 5850 / 3 = 1950 (the remainder is 0, so 3 and 1950 are divisors of 5850)
  • ...
  • 5850 / 75 = 78 (the remainder is 0, so 75 and 78 are divisors of 5850)
  • 5850 / 76 = 76.973684210526 (the remainder is 74, so 76 is not a divisor of 5850)