What are the divisors of 1526?

1, 2, 7, 14, 109, 218, 763, 1526

4 even divisors

2, 14, 218, 1526

4 odd divisors

1, 7, 109, 763

How to compute the divisors of 1526?

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

  • 1526 / 1 = 1526 (the remainder is 0, so 1 is a divisor of 1526)
  • 1526 / 2 = 763 (the remainder is 0, so 2 is a divisor of 1526)
  • 1526 / 3 = 508.66666666667 (the remainder is 2, so 3 is not a divisor of 1526)
  • ...
  • 1526 / 1525 = 1.0006557377049 (the remainder is 1, so 1525 is not a divisor of 1526)
  • 1526 / 1526 = 1 (the remainder is 0, so 1526 is a divisor of 1526)

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 1526 (i.e. 39.064049969249). 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 )

  • 1526 / 1 = 1526 (the remainder is 0, so 1 and 1526 are divisors of 1526)
  • 1526 / 2 = 763 (the remainder is 0, so 2 and 763 are divisors of 1526)
  • 1526 / 3 = 508.66666666667 (the remainder is 2, so 3 is not a divisor of 1526)
  • ...
  • 1526 / 38 = 40.157894736842 (the remainder is 6, so 38 is not a divisor of 1526)
  • 1526 / 39 = 39.128205128205 (the remainder is 5, so 39 is not a divisor of 1526)