What are the divisors of 1324?

1, 2, 4, 331, 662, 1324

4 even divisors

2, 4, 662, 1324

2 odd divisors

1, 331

How to compute the divisors of 1324?

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

  • 1324 / 1 = 1324 (the remainder is 0, so 1 is a divisor of 1324)
  • 1324 / 2 = 662 (the remainder is 0, so 2 is a divisor of 1324)
  • 1324 / 3 = 441.33333333333 (the remainder is 1, so 3 is not a divisor of 1324)
  • ...
  • 1324 / 1323 = 1.0007558578987 (the remainder is 1, so 1323 is not a divisor of 1324)
  • 1324 / 1324 = 1 (the remainder is 0, so 1324 is a divisor of 1324)

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 1324 (i.e. 36.386810797321). 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 )

  • 1324 / 1 = 1324 (the remainder is 0, so 1 and 1324 are divisors of 1324)
  • 1324 / 2 = 662 (the remainder is 0, so 2 and 662 are divisors of 1324)
  • 1324 / 3 = 441.33333333333 (the remainder is 1, so 3 is not a divisor of 1324)
  • ...
  • 1324 / 35 = 37.828571428571 (the remainder is 29, so 35 is not a divisor of 1324)
  • 1324 / 36 = 36.777777777778 (the remainder is 28, so 36 is not a divisor of 1324)