What are the divisors of 5682?

1, 2, 3, 6, 947, 1894, 2841, 5682

4 even divisors

2, 6, 1894, 5682

4 odd divisors

1, 3, 947, 2841

How to compute the divisors of 5682?

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

  • 5682 / 1 = 5682 (the remainder is 0, so 1 is a divisor of 5682)
  • 5682 / 2 = 2841 (the remainder is 0, so 2 is a divisor of 5682)
  • 5682 / 3 = 1894 (the remainder is 0, so 3 is a divisor of 5682)
  • ...
  • 5682 / 5681 = 1.0001760253477 (the remainder is 1, so 5681 is not a divisor of 5682)
  • 5682 / 5682 = 1 (the remainder is 0, so 5682 is a divisor of 5682)

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 5682 (i.e. 75.379042180171). 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 )

  • 5682 / 1 = 5682 (the remainder is 0, so 1 and 5682 are divisors of 5682)
  • 5682 / 2 = 2841 (the remainder is 0, so 2 and 2841 are divisors of 5682)
  • 5682 / 3 = 1894 (the remainder is 0, so 3 and 1894 are divisors of 5682)
  • ...
  • 5682 / 74 = 76.783783783784 (the remainder is 58, so 74 is not a divisor of 5682)
  • 5682 / 75 = 75.76 (the remainder is 57, so 75 is not a divisor of 5682)