What are the divisors of 1496?

1, 2, 4, 8, 11, 17, 22, 34, 44, 68, 88, 136, 187, 374, 748, 1496

12 even divisors

2, 4, 8, 22, 34, 44, 68, 88, 136, 374, 748, 1496

4 odd divisors

1, 11, 17, 187

How to compute the divisors of 1496?

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

  • 1496 / 1 = 1496 (the remainder is 0, so 1 is a divisor of 1496)
  • 1496 / 2 = 748 (the remainder is 0, so 2 is a divisor of 1496)
  • 1496 / 3 = 498.66666666667 (the remainder is 2, so 3 is not a divisor of 1496)
  • ...
  • 1496 / 1495 = 1.0006688963211 (the remainder is 1, so 1495 is not a divisor of 1496)
  • 1496 / 1496 = 1 (the remainder is 0, so 1496 is a divisor of 1496)

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 1496 (i.e. 38.678159211627). 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 )

  • 1496 / 1 = 1496 (the remainder is 0, so 1 and 1496 are divisors of 1496)
  • 1496 / 2 = 748 (the remainder is 0, so 2 and 748 are divisors of 1496)
  • 1496 / 3 = 498.66666666667 (the remainder is 2, so 3 is not a divisor of 1496)
  • ...
  • 1496 / 37 = 40.432432432432 (the remainder is 16, so 37 is not a divisor of 1496)
  • 1496 / 38 = 39.368421052632 (the remainder is 14, so 38 is not a divisor of 1496)