What are the divisors of 5620?

1, 2, 4, 5, 10, 20, 281, 562, 1124, 1405, 2810, 5620

8 even divisors

2, 4, 10, 20, 562, 1124, 2810, 5620

4 odd divisors

1, 5, 281, 1405

How to compute the divisors of 5620?

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

  • 5620 / 1 = 5620 (the remainder is 0, so 1 is a divisor of 5620)
  • 5620 / 2 = 2810 (the remainder is 0, so 2 is a divisor of 5620)
  • 5620 / 3 = 1873.3333333333 (the remainder is 1, so 3 is not a divisor of 5620)
  • ...
  • 5620 / 5619 = 1.0001779676099 (the remainder is 1, so 5619 is not a divisor of 5620)
  • 5620 / 5620 = 1 (the remainder is 0, so 5620 is a divisor of 5620)

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 5620 (i.e. 74.966659255965). 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 )

  • 5620 / 1 = 5620 (the remainder is 0, so 1 and 5620 are divisors of 5620)
  • 5620 / 2 = 2810 (the remainder is 0, so 2 and 2810 are divisors of 5620)
  • 5620 / 3 = 1873.3333333333 (the remainder is 1, so 3 is not a divisor of 5620)
  • ...
  • 5620 / 73 = 76.986301369863 (the remainder is 72, so 73 is not a divisor of 5620)
  • 5620 / 74 = 75.945945945946 (the remainder is 70, so 74 is not a divisor of 5620)