What are the divisors of 1690?

1, 2, 5, 10, 13, 26, 65, 130, 169, 338, 845, 1690

6 even divisors

2, 10, 26, 130, 338, 1690

6 odd divisors

1, 5, 13, 65, 169, 845

How to compute the divisors of 1690?

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

  • 1690 / 1 = 1690 (the remainder is 0, so 1 is a divisor of 1690)
  • 1690 / 2 = 845 (the remainder is 0, so 2 is a divisor of 1690)
  • 1690 / 3 = 563.33333333333 (the remainder is 1, so 3 is not a divisor of 1690)
  • ...
  • 1690 / 1689 = 1.0005920663114 (the remainder is 1, so 1689 is not a divisor of 1690)
  • 1690 / 1690 = 1 (the remainder is 0, so 1690 is a divisor of 1690)

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 1690 (i.e. 41.109609582189). 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 )

  • 1690 / 1 = 1690 (the remainder is 0, so 1 and 1690 are divisors of 1690)
  • 1690 / 2 = 845 (the remainder is 0, so 2 and 845 are divisors of 1690)
  • 1690 / 3 = 563.33333333333 (the remainder is 1, so 3 is not a divisor of 1690)
  • ...
  • 1690 / 40 = 42.25 (the remainder is 10, so 40 is not a divisor of 1690)
  • 1690 / 41 = 41.219512195122 (the remainder is 9, so 41 is not a divisor of 1690)