What are the divisors of 3820?

1, 2, 4, 5, 10, 20, 191, 382, 764, 955, 1910, 3820

8 even divisors

2, 4, 10, 20, 382, 764, 1910, 3820

4 odd divisors

1, 5, 191, 955

How to compute the divisors of 3820?

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

  • 3820 / 1 = 3820 (the remainder is 0, so 1 is a divisor of 3820)
  • 3820 / 2 = 1910 (the remainder is 0, so 2 is a divisor of 3820)
  • 3820 / 3 = 1273.3333333333 (the remainder is 1, so 3 is not a divisor of 3820)
  • ...
  • 3820 / 3819 = 1.0002618486515 (the remainder is 1, so 3819 is not a divisor of 3820)
  • 3820 / 3820 = 1 (the remainder is 0, so 3820 is a divisor of 3820)

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 3820 (i.e. 61.80614856145). 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 )

  • 3820 / 1 = 3820 (the remainder is 0, so 1 and 3820 are divisors of 3820)
  • 3820 / 2 = 1910 (the remainder is 0, so 2 and 1910 are divisors of 3820)
  • 3820 / 3 = 1273.3333333333 (the remainder is 1, so 3 is not a divisor of 3820)
  • ...
  • 3820 / 60 = 63.666666666667 (the remainder is 40, so 60 is not a divisor of 3820)
  • 3820 / 61 = 62.622950819672 (the remainder is 38, so 61 is not a divisor of 3820)