What are the divisors of 1516?

1, 2, 4, 379, 758, 1516

4 even divisors

2, 4, 758, 1516

2 odd divisors

1, 379

How to compute the divisors of 1516?

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

  • 1516 / 1 = 1516 (the remainder is 0, so 1 is a divisor of 1516)
  • 1516 / 2 = 758 (the remainder is 0, so 2 is a divisor of 1516)
  • 1516 / 3 = 505.33333333333 (the remainder is 1, so 3 is not a divisor of 1516)
  • ...
  • 1516 / 1515 = 1.0006600660066 (the remainder is 1, so 1515 is not a divisor of 1516)
  • 1516 / 1516 = 1 (the remainder is 0, so 1516 is a divisor of 1516)

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 1516 (i.e. 38.935844667864). 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 )

  • 1516 / 1 = 1516 (the remainder is 0, so 1 and 1516 are divisors of 1516)
  • 1516 / 2 = 758 (the remainder is 0, so 2 and 758 are divisors of 1516)
  • 1516 / 3 = 505.33333333333 (the remainder is 1, so 3 is not a divisor of 1516)
  • ...
  • 1516 / 37 = 40.972972972973 (the remainder is 36, so 37 is not a divisor of 1516)
  • 1516 / 38 = 39.894736842105 (the remainder is 34, so 38 is not a divisor of 1516)