What are the divisors of 6003?

1, 3, 9, 23, 29, 69, 87, 207, 261, 667, 2001, 6003

12 odd divisors

1, 3, 9, 23, 29, 69, 87, 207, 261, 667, 2001, 6003

How to compute the divisors of 6003?

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

  • 6003 / 1 = 6003 (the remainder is 0, so 1 is a divisor of 6003)
  • 6003 / 2 = 3001.5 (the remainder is 1, so 2 is not a divisor of 6003)
  • 6003 / 3 = 2001 (the remainder is 0, so 3 is a divisor of 6003)
  • ...
  • 6003 / 6002 = 1.0001666111296 (the remainder is 1, so 6002 is not a divisor of 6003)
  • 6003 / 6003 = 1 (the remainder is 0, so 6003 is a divisor of 6003)

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 6003 (i.e. 77.47902942087). 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 )

  • 6003 / 1 = 6003 (the remainder is 0, so 1 and 6003 are divisors of 6003)
  • 6003 / 2 = 3001.5 (the remainder is 1, so 2 is not a divisor of 6003)
  • 6003 / 3 = 2001 (the remainder is 0, so 3 and 2001 are divisors of 6003)
  • ...
  • 6003 / 76 = 78.986842105263 (the remainder is 75, so 76 is not a divisor of 6003)
  • 6003 / 77 = 77.961038961039 (the remainder is 74, so 77 is not a divisor of 6003)