What are the divisors of 5824?

1, 2, 4, 7, 8, 13, 14, 16, 26, 28, 32, 52, 56, 64, 91, 104, 112, 182, 208, 224, 364, 416, 448, 728, 832, 1456, 2912, 5824

24 even divisors

2, 4, 8, 14, 16, 26, 28, 32, 52, 56, 64, 104, 112, 182, 208, 224, 364, 416, 448, 728, 832, 1456, 2912, 5824

4 odd divisors

1, 7, 13, 91

How to compute the divisors of 5824?

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

  • 5824 / 1 = 5824 (the remainder is 0, so 1 is a divisor of 5824)
  • 5824 / 2 = 2912 (the remainder is 0, so 2 is a divisor of 5824)
  • 5824 / 3 = 1941.3333333333 (the remainder is 1, so 3 is not a divisor of 5824)
  • ...
  • 5824 / 5823 = 1.0001717327838 (the remainder is 1, so 5823 is not a divisor of 5824)
  • 5824 / 5824 = 1 (the remainder is 0, so 5824 is a divisor of 5824)

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 5824 (i.e. 76.315136113356). 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 )

  • 5824 / 1 = 5824 (the remainder is 0, so 1 and 5824 are divisors of 5824)
  • 5824 / 2 = 2912 (the remainder is 0, so 2 and 2912 are divisors of 5824)
  • 5824 / 3 = 1941.3333333333 (the remainder is 1, so 3 is not a divisor of 5824)
  • ...
  • 5824 / 75 = 77.653333333333 (the remainder is 49, so 75 is not a divisor of 5824)
  • 5824 / 76 = 76.631578947368 (the remainder is 48, so 76 is not a divisor of 5824)