What are the divisors of 5344?

1, 2, 4, 8, 16, 32, 167, 334, 668, 1336, 2672, 5344

10 even divisors

2, 4, 8, 16, 32, 334, 668, 1336, 2672, 5344

2 odd divisors

1, 167

How to compute the divisors of 5344?

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

  • 5344 / 1 = 5344 (the remainder is 0, so 1 is a divisor of 5344)
  • 5344 / 2 = 2672 (the remainder is 0, so 2 is a divisor of 5344)
  • 5344 / 3 = 1781.3333333333 (the remainder is 1, so 3 is not a divisor of 5344)
  • ...
  • 5344 / 5343 = 1.0001871607711 (the remainder is 1, so 5343 is not a divisor of 5344)
  • 5344 / 5344 = 1 (the remainder is 0, so 5344 is a divisor of 5344)

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 5344 (i.e. 73.102667529988). 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 )

  • 5344 / 1 = 5344 (the remainder is 0, so 1 and 5344 are divisors of 5344)
  • 5344 / 2 = 2672 (the remainder is 0, so 2 and 2672 are divisors of 5344)
  • 5344 / 3 = 1781.3333333333 (the remainder is 1, so 3 is not a divisor of 5344)
  • ...
  • 5344 / 72 = 74.222222222222 (the remainder is 16, so 72 is not a divisor of 5344)
  • 5344 / 73 = 73.205479452055 (the remainder is 15, so 73 is not a divisor of 5344)