What are the divisors of 5628?

1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 67, 84, 134, 201, 268, 402, 469, 804, 938, 1407, 1876, 2814, 5628

16 even divisors

2, 4, 6, 12, 14, 28, 42, 84, 134, 268, 402, 804, 938, 1876, 2814, 5628

8 odd divisors

1, 3, 7, 21, 67, 201, 469, 1407

How to compute the divisors of 5628?

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

  • 5628 / 1 = 5628 (the remainder is 0, so 1 is a divisor of 5628)
  • 5628 / 2 = 2814 (the remainder is 0, so 2 is a divisor of 5628)
  • 5628 / 3 = 1876 (the remainder is 0, so 3 is a divisor of 5628)
  • ...
  • 5628 / 5627 = 1.0001777145904 (the remainder is 1, so 5627 is not a divisor of 5628)
  • 5628 / 5628 = 1 (the remainder is 0, so 5628 is a divisor of 5628)

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 5628 (i.e. 75.019997334044). 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 )

  • 5628 / 1 = 5628 (the remainder is 0, so 1 and 5628 are divisors of 5628)
  • 5628 / 2 = 2814 (the remainder is 0, so 2 and 2814 are divisors of 5628)
  • 5628 / 3 = 1876 (the remainder is 0, so 3 and 1876 are divisors of 5628)
  • ...
  • 5628 / 74 = 76.054054054054 (the remainder is 4, so 74 is not a divisor of 5628)
  • 5628 / 75 = 75.04 (the remainder is 3, so 75 is not a divisor of 5628)