What are the divisors of 5390?

1, 2, 5, 7, 10, 11, 14, 22, 35, 49, 55, 70, 77, 98, 110, 154, 245, 385, 490, 539, 770, 1078, 2695, 5390

12 even divisors

2, 10, 14, 22, 70, 98, 110, 154, 490, 770, 1078, 5390

12 odd divisors

1, 5, 7, 11, 35, 49, 55, 77, 245, 385, 539, 2695

How to compute the divisors of 5390?

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

  • 5390 / 1 = 5390 (the remainder is 0, so 1 is a divisor of 5390)
  • 5390 / 2 = 2695 (the remainder is 0, so 2 is a divisor of 5390)
  • 5390 / 3 = 1796.6666666667 (the remainder is 2, so 3 is not a divisor of 5390)
  • ...
  • 5390 / 5389 = 1.0001855631843 (the remainder is 1, so 5389 is not a divisor of 5390)
  • 5390 / 5390 = 1 (the remainder is 0, so 5390 is a divisor of 5390)

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 5390 (i.e. 73.416619371911). 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 )

  • 5390 / 1 = 5390 (the remainder is 0, so 1 and 5390 are divisors of 5390)
  • 5390 / 2 = 2695 (the remainder is 0, so 2 and 2695 are divisors of 5390)
  • 5390 / 3 = 1796.6666666667 (the remainder is 2, so 3 is not a divisor of 5390)
  • ...
  • 5390 / 72 = 74.861111111111 (the remainder is 62, so 72 is not a divisor of 5390)
  • 5390 / 73 = 73.835616438356 (the remainder is 61, so 73 is not a divisor of 5390)