What are the divisors of 5778?

1, 2, 3, 6, 9, 18, 27, 54, 107, 214, 321, 642, 963, 1926, 2889, 5778

8 even divisors

2, 6, 18, 54, 214, 642, 1926, 5778

8 odd divisors

1, 3, 9, 27, 107, 321, 963, 2889

How to compute the divisors of 5778?

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

  • 5778 / 1 = 5778 (the remainder is 0, so 1 is a divisor of 5778)
  • 5778 / 2 = 2889 (the remainder is 0, so 2 is a divisor of 5778)
  • 5778 / 3 = 1926 (the remainder is 0, so 3 is a divisor of 5778)
  • ...
  • 5778 / 5777 = 1.000173100225 (the remainder is 1, so 5777 is not a divisor of 5778)
  • 5778 / 5778 = 1 (the remainder is 0, so 5778 is a divisor of 5778)

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 5778 (i.e. 76.01315675592). 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 )

  • 5778 / 1 = 5778 (the remainder is 0, so 1 and 5778 are divisors of 5778)
  • 5778 / 2 = 2889 (the remainder is 0, so 2 and 2889 are divisors of 5778)
  • 5778 / 3 = 1926 (the remainder is 0, so 3 and 1926 are divisors of 5778)
  • ...
  • 5778 / 75 = 77.04 (the remainder is 3, so 75 is not a divisor of 5778)
  • 5778 / 76 = 76.026315789474 (the remainder is 2, so 76 is not a divisor of 5778)