What are the divisors of 5635?

1, 5, 7, 23, 35, 49, 115, 161, 245, 805, 1127, 5635

12 odd divisors

1, 5, 7, 23, 35, 49, 115, 161, 245, 805, 1127, 5635

How to compute the divisors of 5635?

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

  • 5635 / 1 = 5635 (the remainder is 0, so 1 is a divisor of 5635)
  • 5635 / 2 = 2817.5 (the remainder is 1, so 2 is not a divisor of 5635)
  • 5635 / 3 = 1878.3333333333 (the remainder is 1, so 3 is not a divisor of 5635)
  • ...
  • 5635 / 5634 = 1.0001774937877 (the remainder is 1, so 5634 is not a divisor of 5635)
  • 5635 / 5635 = 1 (the remainder is 0, so 5635 is a divisor of 5635)

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 5635 (i.e. 75.066637063345). 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 )

  • 5635 / 1 = 5635 (the remainder is 0, so 1 and 5635 are divisors of 5635)
  • 5635 / 2 = 2817.5 (the remainder is 1, so 2 is not a divisor of 5635)
  • 5635 / 3 = 1878.3333333333 (the remainder is 1, so 3 is not a divisor of 5635)
  • ...
  • 5635 / 74 = 76.148648648649 (the remainder is 11, so 74 is not a divisor of 5635)
  • 5635 / 75 = 75.133333333333 (the remainder is 10, so 75 is not a divisor of 5635)