What are the divisors of 1820?

1, 2, 4, 5, 7, 10, 13, 14, 20, 26, 28, 35, 52, 65, 70, 91, 130, 140, 182, 260, 364, 455, 910, 1820

16 even divisors

2, 4, 10, 14, 20, 26, 28, 52, 70, 130, 140, 182, 260, 364, 910, 1820

8 odd divisors

1, 5, 7, 13, 35, 65, 91, 455

How to compute the divisors of 1820?

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

  • 1820 / 1 = 1820 (the remainder is 0, so 1 is a divisor of 1820)
  • 1820 / 2 = 910 (the remainder is 0, so 2 is a divisor of 1820)
  • 1820 / 3 = 606.66666666667 (the remainder is 2, so 3 is not a divisor of 1820)
  • ...
  • 1820 / 1819 = 1.0005497526113 (the remainder is 1, so 1819 is not a divisor of 1820)
  • 1820 / 1820 = 1 (the remainder is 0, so 1820 is a divisor of 1820)

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 1820 (i.e. 42.661458015403). 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 )

  • 1820 / 1 = 1820 (the remainder is 0, so 1 and 1820 are divisors of 1820)
  • 1820 / 2 = 910 (the remainder is 0, so 2 and 910 are divisors of 1820)
  • 1820 / 3 = 606.66666666667 (the remainder is 2, so 3 is not a divisor of 1820)
  • ...
  • 1820 / 41 = 44.390243902439 (the remainder is 16, so 41 is not a divisor of 1820)
  • 1820 / 42 = 43.333333333333 (the remainder is 14, so 42 is not a divisor of 1820)