What are the divisors of 1170?

1, 2, 3, 5, 6, 9, 10, 13, 15, 18, 26, 30, 39, 45, 65, 78, 90, 117, 130, 195, 234, 390, 585, 1170

12 even divisors

2, 6, 10, 18, 26, 30, 78, 90, 130, 234, 390, 1170

12 odd divisors

1, 3, 5, 9, 13, 15, 39, 45, 65, 117, 195, 585

How to compute the divisors of 1170?

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

  • 1170 / 1 = 1170 (the remainder is 0, so 1 is a divisor of 1170)
  • 1170 / 2 = 585 (the remainder is 0, so 2 is a divisor of 1170)
  • 1170 / 3 = 390 (the remainder is 0, so 3 is a divisor of 1170)
  • ...
  • 1170 / 1169 = 1.0008554319932 (the remainder is 1, so 1169 is not a divisor of 1170)
  • 1170 / 1170 = 1 (the remainder is 0, so 1170 is a divisor of 1170)

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 1170 (i.e. 34.205262752974). 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 )

  • 1170 / 1 = 1170 (the remainder is 0, so 1 and 1170 are divisors of 1170)
  • 1170 / 2 = 585 (the remainder is 0, so 2 and 585 are divisors of 1170)
  • 1170 / 3 = 390 (the remainder is 0, so 3 and 390 are divisors of 1170)
  • ...
  • 1170 / 33 = 35.454545454545 (the remainder is 15, so 33 is not a divisor of 1170)
  • 1170 / 34 = 34.411764705882 (the remainder is 14, so 34 is not a divisor of 1170)