What are the divisors of 5656?

1, 2, 4, 7, 8, 14, 28, 56, 101, 202, 404, 707, 808, 1414, 2828, 5656

12 even divisors

2, 4, 8, 14, 28, 56, 202, 404, 808, 1414, 2828, 5656

4 odd divisors

1, 7, 101, 707

How to compute the divisors of 5656?

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

  • 5656 / 1 = 5656 (the remainder is 0, so 1 is a divisor of 5656)
  • 5656 / 2 = 2828 (the remainder is 0, so 2 is a divisor of 5656)
  • 5656 / 3 = 1885.3333333333 (the remainder is 1, so 3 is not a divisor of 5656)
  • ...
  • 5656 / 5655 = 1.0001768346596 (the remainder is 1, so 5655 is not a divisor of 5656)
  • 5656 / 5656 = 1 (the remainder is 0, so 5656 is a divisor of 5656)

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 5656 (i.e. 75.206382707853). 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 )

  • 5656 / 1 = 5656 (the remainder is 0, so 1 and 5656 are divisors of 5656)
  • 5656 / 2 = 2828 (the remainder is 0, so 2 and 2828 are divisors of 5656)
  • 5656 / 3 = 1885.3333333333 (the remainder is 1, so 3 is not a divisor of 5656)
  • ...
  • 5656 / 74 = 76.432432432432 (the remainder is 32, so 74 is not a divisor of 5656)
  • 5656 / 75 = 75.413333333333 (the remainder is 31, so 75 is not a divisor of 5656)