What are the divisors of 546?

1, 2, 3, 6, 7, 13, 14, 21, 26, 39, 42, 78, 91, 182, 273, 546

8 even divisors

2, 6, 14, 26, 42, 78, 182, 546

8 odd divisors

1, 3, 7, 13, 21, 39, 91, 273

How to compute the divisors of 546?

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

  • 546 / 1 = 546 (the remainder is 0, so 1 is a divisor of 546)
  • 546 / 2 = 273 (the remainder is 0, so 2 is a divisor of 546)
  • 546 / 3 = 182 (the remainder is 0, so 3 is a divisor of 546)
  • ...
  • 546 / 545 = 1.0018348623853 (the remainder is 1, so 545 is not a divisor of 546)
  • 546 / 546 = 1 (the remainder is 0, so 546 is a divisor of 546)

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 546 (i.e. 23.366642891096). 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 )

  • 546 / 1 = 546 (the remainder is 0, so 1 and 546 are divisors of 546)
  • 546 / 2 = 273 (the remainder is 0, so 2 and 273 are divisors of 546)
  • 546 / 3 = 182 (the remainder is 0, so 3 and 182 are divisors of 546)
  • ...
  • 546 / 22 = 24.818181818182 (the remainder is 18, so 22 is not a divisor of 546)
  • 546 / 23 = 23.739130434783 (the remainder is 17, so 23 is not a divisor of 546)