What are the divisors of 5402?

1, 2, 37, 73, 74, 146, 2701, 5402

4 even divisors

2, 74, 146, 5402

4 odd divisors

1, 37, 73, 2701

How to compute the divisors of 5402?

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

  • 5402 / 1 = 5402 (the remainder is 0, so 1 is a divisor of 5402)
  • 5402 / 2 = 2701 (the remainder is 0, so 2 is a divisor of 5402)
  • 5402 / 3 = 1800.6666666667 (the remainder is 2, so 3 is not a divisor of 5402)
  • ...
  • 5402 / 5401 = 1.000185150898 (the remainder is 1, so 5401 is not a divisor of 5402)
  • 5402 / 5402 = 1 (the remainder is 0, so 5402 is a divisor of 5402)

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 5402 (i.e. 73.498299300052). 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 )

  • 5402 / 1 = 5402 (the remainder is 0, so 1 and 5402 are divisors of 5402)
  • 5402 / 2 = 2701 (the remainder is 0, so 2 and 2701 are divisors of 5402)
  • 5402 / 3 = 1800.6666666667 (the remainder is 2, so 3 is not a divisor of 5402)
  • ...
  • 5402 / 72 = 75.027777777778 (the remainder is 2, so 72 is not a divisor of 5402)
  • 5402 / 73 = 74 (the remainder is 0, so 73 and 74 are divisors of 5402)