What are the divisors of 5724?

1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 53, 54, 106, 108, 159, 212, 318, 477, 636, 954, 1431, 1908, 2862, 5724

16 even divisors

2, 4, 6, 12, 18, 36, 54, 106, 108, 212, 318, 636, 954, 1908, 2862, 5724

8 odd divisors

1, 3, 9, 27, 53, 159, 477, 1431

How to compute the divisors of 5724?

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

  • 5724 / 1 = 5724 (the remainder is 0, so 1 is a divisor of 5724)
  • 5724 / 2 = 2862 (the remainder is 0, so 2 is a divisor of 5724)
  • 5724 / 3 = 1908 (the remainder is 0, so 3 is a divisor of 5724)
  • ...
  • 5724 / 5723 = 1.0001747335314 (the remainder is 1, so 5723 is not a divisor of 5724)
  • 5724 / 5724 = 1 (the remainder is 0, so 5724 is a divisor of 5724)

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 5724 (i.e. 75.657121277511). 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 )

  • 5724 / 1 = 5724 (the remainder is 0, so 1 and 5724 are divisors of 5724)
  • 5724 / 2 = 2862 (the remainder is 0, so 2 and 2862 are divisors of 5724)
  • 5724 / 3 = 1908 (the remainder is 0, so 3 and 1908 are divisors of 5724)
  • ...
  • 5724 / 74 = 77.351351351351 (the remainder is 26, so 74 is not a divisor of 5724)
  • 5724 / 75 = 76.32 (the remainder is 24, so 75 is not a divisor of 5724)