What are the divisors of 5474?

1, 2, 7, 14, 17, 23, 34, 46, 119, 161, 238, 322, 391, 782, 2737, 5474

8 even divisors

2, 14, 34, 46, 238, 322, 782, 5474

8 odd divisors

1, 7, 17, 23, 119, 161, 391, 2737

How to compute the divisors of 5474?

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

  • 5474 / 1 = 5474 (the remainder is 0, so 1 is a divisor of 5474)
  • 5474 / 2 = 2737 (the remainder is 0, so 2 is a divisor of 5474)
  • 5474 / 3 = 1824.6666666667 (the remainder is 2, so 3 is not a divisor of 5474)
  • ...
  • 5474 / 5473 = 1.0001827151471 (the remainder is 1, so 5473 is not a divisor of 5474)
  • 5474 / 5474 = 1 (the remainder is 0, so 5474 is a divisor of 5474)

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 5474 (i.e. 73.986485252376). 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 )

  • 5474 / 1 = 5474 (the remainder is 0, so 1 and 5474 are divisors of 5474)
  • 5474 / 2 = 2737 (the remainder is 0, so 2 and 2737 are divisors of 5474)
  • 5474 / 3 = 1824.6666666667 (the remainder is 2, so 3 is not a divisor of 5474)
  • ...
  • 5474 / 72 = 76.027777777778 (the remainder is 2, so 72 is not a divisor of 5474)
  • 5474 / 73 = 74.986301369863 (the remainder is 72, so 73 is not a divisor of 5474)