What are the divisors of 588?

1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 49, 84, 98, 147, 196, 294, 588

12 even divisors

2, 4, 6, 12, 14, 28, 42, 84, 98, 196, 294, 588

6 odd divisors

1, 3, 7, 21, 49, 147

How to compute the divisors of 588?

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

  • 588 / 1 = 588 (the remainder is 0, so 1 is a divisor of 588)
  • 588 / 2 = 294 (the remainder is 0, so 2 is a divisor of 588)
  • 588 / 3 = 196 (the remainder is 0, so 3 is a divisor of 588)
  • ...
  • 588 / 587 = 1.0017035775128 (the remainder is 1, so 587 is not a divisor of 588)
  • 588 / 588 = 1 (the remainder is 0, so 588 is a divisor of 588)

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 588 (i.e. 24.248711305964). 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 )

  • 588 / 1 = 588 (the remainder is 0, so 1 and 588 are divisors of 588)
  • 588 / 2 = 294 (the remainder is 0, so 2 and 294 are divisors of 588)
  • 588 / 3 = 196 (the remainder is 0, so 3 and 196 are divisors of 588)
  • ...
  • 588 / 23 = 25.565217391304 (the remainder is 13, so 23 is not a divisor of 588)
  • 588 / 24 = 24.5 (the remainder is 12, so 24 is not a divisor of 588)