What are the divisors of 930?

1, 2, 3, 5, 6, 10, 15, 30, 31, 62, 93, 155, 186, 310, 465, 930

8 even divisors

2, 6, 10, 30, 62, 186, 310, 930

8 odd divisors

1, 3, 5, 15, 31, 93, 155, 465

How to compute the divisors of 930?

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

  • 930 / 1 = 930 (the remainder is 0, so 1 is a divisor of 930)
  • 930 / 2 = 465 (the remainder is 0, so 2 is a divisor of 930)
  • 930 / 3 = 310 (the remainder is 0, so 3 is a divisor of 930)
  • ...
  • 930 / 929 = 1.0010764262648 (the remainder is 1, so 929 is not a divisor of 930)
  • 930 / 930 = 1 (the remainder is 0, so 930 is a divisor of 930)

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 930 (i.e. 30.495901363954). 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 )

  • 930 / 1 = 930 (the remainder is 0, so 1 and 930 are divisors of 930)
  • 930 / 2 = 465 (the remainder is 0, so 2 and 465 are divisors of 930)
  • 930 / 3 = 310 (the remainder is 0, so 3 and 310 are divisors of 930)
  • ...
  • 930 / 29 = 32.068965517241 (the remainder is 2, so 29 is not a divisor of 930)
  • 930 / 30 = 31 (the remainder is 0, so 30 and 31 are divisors of 930)