What are the divisors of 828?

1, 2, 3, 4, 6, 9, 12, 18, 23, 36, 46, 69, 92, 138, 207, 276, 414, 828

12 even divisors

2, 4, 6, 12, 18, 36, 46, 92, 138, 276, 414, 828

6 odd divisors

1, 3, 9, 23, 69, 207

How to compute the divisors of 828?

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

  • 828 / 1 = 828 (the remainder is 0, so 1 is a divisor of 828)
  • 828 / 2 = 414 (the remainder is 0, so 2 is a divisor of 828)
  • 828 / 3 = 276 (the remainder is 0, so 3 is a divisor of 828)
  • ...
  • 828 / 827 = 1.0012091898428 (the remainder is 1, so 827 is not a divisor of 828)
  • 828 / 828 = 1 (the remainder is 0, so 828 is a divisor of 828)

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 828 (i.e. 28.774989139876). 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 )

  • 828 / 1 = 828 (the remainder is 0, so 1 and 828 are divisors of 828)
  • 828 / 2 = 414 (the remainder is 0, so 2 and 414 are divisors of 828)
  • 828 / 3 = 276 (the remainder is 0, so 3 and 276 are divisors of 828)
  • ...
  • 828 / 27 = 30.666666666667 (the remainder is 18, so 27 is not a divisor of 828)
  • 828 / 28 = 29.571428571429 (the remainder is 16, so 28 is not a divisor of 828)