What are the divisors of 1208?

1, 2, 4, 8, 151, 302, 604, 1208

6 even divisors

2, 4, 8, 302, 604, 1208

2 odd divisors

1, 151

How to compute the divisors of 1208?

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

  • 1208 / 1 = 1208 (the remainder is 0, so 1 is a divisor of 1208)
  • 1208 / 2 = 604 (the remainder is 0, so 2 is a divisor of 1208)
  • 1208 / 3 = 402.66666666667 (the remainder is 2, so 3 is not a divisor of 1208)
  • ...
  • 1208 / 1207 = 1.0008285004143 (the remainder is 1, so 1207 is not a divisor of 1208)
  • 1208 / 1208 = 1 (the remainder is 0, so 1208 is a divisor of 1208)

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 1208 (i.e. 34.756294393966). 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 )

  • 1208 / 1 = 1208 (the remainder is 0, so 1 and 1208 are divisors of 1208)
  • 1208 / 2 = 604 (the remainder is 0, so 2 and 604 are divisors of 1208)
  • 1208 / 3 = 402.66666666667 (the remainder is 2, so 3 is not a divisor of 1208)
  • ...
  • 1208 / 33 = 36.606060606061 (the remainder is 20, so 33 is not a divisor of 1208)
  • 1208 / 34 = 35.529411764706 (the remainder is 18, so 34 is not a divisor of 1208)