What are the divisors of 834?

1, 2, 3, 6, 139, 278, 417, 834

4 even divisors

2, 6, 278, 834

4 odd divisors

1, 3, 139, 417

How to compute the divisors of 834?

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

  • 834 / 1 = 834 (the remainder is 0, so 1 is a divisor of 834)
  • 834 / 2 = 417 (the remainder is 0, so 2 is a divisor of 834)
  • 834 / 3 = 278 (the remainder is 0, so 3 is a divisor of 834)
  • ...
  • 834 / 833 = 1.0012004801921 (the remainder is 1, so 833 is not a divisor of 834)
  • 834 / 834 = 1 (the remainder is 0, so 834 is a divisor of 834)

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 834 (i.e. 28.879058156387). 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 )

  • 834 / 1 = 834 (the remainder is 0, so 1 and 834 are divisors of 834)
  • 834 / 2 = 417 (the remainder is 0, so 2 and 417 are divisors of 834)
  • 834 / 3 = 278 (the remainder is 0, so 3 and 278 are divisors of 834)
  • ...
  • 834 / 27 = 30.888888888889 (the remainder is 24, so 27 is not a divisor of 834)
  • 834 / 28 = 29.785714285714 (the remainder is 22, so 28 is not a divisor of 834)