What are the divisors of 5346?

1, 2, 3, 6, 9, 11, 18, 22, 27, 33, 54, 66, 81, 99, 162, 198, 243, 297, 486, 594, 891, 1782, 2673, 5346

12 even divisors

2, 6, 18, 22, 54, 66, 162, 198, 486, 594, 1782, 5346

12 odd divisors

1, 3, 9, 11, 27, 33, 81, 99, 243, 297, 891, 2673

How to compute the divisors of 5346?

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

  • 5346 / 1 = 5346 (the remainder is 0, so 1 is a divisor of 5346)
  • 5346 / 2 = 2673 (the remainder is 0, so 2 is a divisor of 5346)
  • 5346 / 3 = 1782 (the remainder is 0, so 3 is a divisor of 5346)
  • ...
  • 5346 / 5345 = 1.000187090739 (the remainder is 1, so 5345 is not a divisor of 5346)
  • 5346 / 5346 = 1 (the remainder is 0, so 5346 is a divisor of 5346)

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 5346 (i.e. 73.116345641724). 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 )

  • 5346 / 1 = 5346 (the remainder is 0, so 1 and 5346 are divisors of 5346)
  • 5346 / 2 = 2673 (the remainder is 0, so 2 and 2673 are divisors of 5346)
  • 5346 / 3 = 1782 (the remainder is 0, so 3 and 1782 are divisors of 5346)
  • ...
  • 5346 / 72 = 74.25 (the remainder is 18, so 72 is not a divisor of 5346)
  • 5346 / 73 = 73.232876712329 (the remainder is 17, so 73 is not a divisor of 5346)