What are the divisors of 836?

1, 2, 4, 11, 19, 22, 38, 44, 76, 209, 418, 836

8 even divisors

2, 4, 22, 38, 44, 76, 418, 836

4 odd divisors

1, 11, 19, 209

How to compute the divisors of 836?

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

  • 836 / 1 = 836 (the remainder is 0, so 1 is a divisor of 836)
  • 836 / 2 = 418 (the remainder is 0, so 2 is a divisor of 836)
  • 836 / 3 = 278.66666666667 (the remainder is 2, so 3 is not a divisor of 836)
  • ...
  • 836 / 835 = 1.0011976047904 (the remainder is 1, so 835 is not a divisor of 836)
  • 836 / 836 = 1 (the remainder is 0, so 836 is a divisor of 836)

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 836 (i.e. 28.913664589602). 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 )

  • 836 / 1 = 836 (the remainder is 0, so 1 and 836 are divisors of 836)
  • 836 / 2 = 418 (the remainder is 0, so 2 and 418 are divisors of 836)
  • 836 / 3 = 278.66666666667 (the remainder is 2, so 3 is not a divisor of 836)
  • ...
  • 836 / 27 = 30.962962962963 (the remainder is 26, so 27 is not a divisor of 836)
  • 836 / 28 = 29.857142857143 (the remainder is 24, so 28 is not a divisor of 836)