What are the divisors of 850?

1, 2, 5, 10, 17, 25, 34, 50, 85, 170, 425, 850

6 even divisors

2, 10, 34, 50, 170, 850

6 odd divisors

1, 5, 17, 25, 85, 425

How to compute the divisors of 850?

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

  • 850 / 1 = 850 (the remainder is 0, so 1 is a divisor of 850)
  • 850 / 2 = 425 (the remainder is 0, so 2 is a divisor of 850)
  • 850 / 3 = 283.33333333333 (the remainder is 1, so 3 is not a divisor of 850)
  • ...
  • 850 / 849 = 1.0011778563015 (the remainder is 1, so 849 is not a divisor of 850)
  • 850 / 850 = 1 (the remainder is 0, so 850 is a divisor of 850)

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 850 (i.e. 29.154759474227). 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 )

  • 850 / 1 = 850 (the remainder is 0, so 1 and 850 are divisors of 850)
  • 850 / 2 = 425 (the remainder is 0, so 2 and 425 are divisors of 850)
  • 850 / 3 = 283.33333333333 (the remainder is 1, so 3 is not a divisor of 850)
  • ...
  • 850 / 28 = 30.357142857143 (the remainder is 10, so 28 is not a divisor of 850)
  • 850 / 29 = 29.310344827586 (the remainder is 9, so 29 is not a divisor of 850)