What are the divisors of 600?

1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 20, 24, 25, 30, 40, 50, 60, 75, 100, 120, 150, 200, 300, 600

18 even divisors

2, 4, 6, 8, 10, 12, 20, 24, 30, 40, 50, 60, 100, 120, 150, 200, 300, 600

6 odd divisors

1, 3, 5, 15, 25, 75

How to compute the divisors of 600?

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

  • 600 / 1 = 600 (the remainder is 0, so 1 is a divisor of 600)
  • 600 / 2 = 300 (the remainder is 0, so 2 is a divisor of 600)
  • 600 / 3 = 200 (the remainder is 0, so 3 is a divisor of 600)
  • ...
  • 600 / 599 = 1.0016694490818 (the remainder is 1, so 599 is not a divisor of 600)
  • 600 / 600 = 1 (the remainder is 0, so 600 is a divisor of 600)

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 600 (i.e. 24.494897427832). 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 )

  • 600 / 1 = 600 (the remainder is 0, so 1 and 600 are divisors of 600)
  • 600 / 2 = 300 (the remainder is 0, so 2 and 300 are divisors of 600)
  • 600 / 3 = 200 (the remainder is 0, so 3 and 200 are divisors of 600)
  • ...
  • 600 / 23 = 26.086956521739 (the remainder is 2, so 23 is not a divisor of 600)
  • 600 / 24 = 25 (the remainder is 0, so 24 and 25 are divisors of 600)