What are the divisors of 3822?

1, 2, 3, 6, 7, 13, 14, 21, 26, 39, 42, 49, 78, 91, 98, 147, 182, 273, 294, 546, 637, 1274, 1911, 3822

12 even divisors

2, 6, 14, 26, 42, 78, 98, 182, 294, 546, 1274, 3822

12 odd divisors

1, 3, 7, 13, 21, 39, 49, 91, 147, 273, 637, 1911

How to compute the divisors of 3822?

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

  • 3822 / 1 = 3822 (the remainder is 0, so 1 is a divisor of 3822)
  • 3822 / 2 = 1911 (the remainder is 0, so 2 is a divisor of 3822)
  • 3822 / 3 = 1274 (the remainder is 0, so 3 is a divisor of 3822)
  • ...
  • 3822 / 3821 = 1.0002617115938 (the remainder is 1, so 3821 is not a divisor of 3822)
  • 3822 / 3822 = 1 (the remainder is 0, so 3822 is a divisor of 3822)

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 3822 (i.e. 61.822326064295). 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 )

  • 3822 / 1 = 3822 (the remainder is 0, so 1 and 3822 are divisors of 3822)
  • 3822 / 2 = 1911 (the remainder is 0, so 2 and 1911 are divisors of 3822)
  • 3822 / 3 = 1274 (the remainder is 0, so 3 and 1274 are divisors of 3822)
  • ...
  • 3822 / 60 = 63.7 (the remainder is 42, so 60 is not a divisor of 3822)
  • 3822 / 61 = 62.655737704918 (the remainder is 40, so 61 is not a divisor of 3822)