What are the divisors of 5035?

1, 5, 19, 53, 95, 265, 1007, 5035

8 odd divisors

1, 5, 19, 53, 95, 265, 1007, 5035

How to compute the divisors of 5035?

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

  • 5035 / 1 = 5035 (the remainder is 0, so 1 is a divisor of 5035)
  • 5035 / 2 = 2517.5 (the remainder is 1, so 2 is not a divisor of 5035)
  • 5035 / 3 = 1678.3333333333 (the remainder is 1, so 3 is not a divisor of 5035)
  • ...
  • 5035 / 5034 = 1.0001986491855 (the remainder is 1, so 5034 is not a divisor of 5035)
  • 5035 / 5035 = 1 (the remainder is 0, so 5035 is a divisor of 5035)

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 5035 (i.e. 70.957733898427). 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 )

  • 5035 / 1 = 5035 (the remainder is 0, so 1 and 5035 are divisors of 5035)
  • 5035 / 2 = 2517.5 (the remainder is 1, so 2 is not a divisor of 5035)
  • 5035 / 3 = 1678.3333333333 (the remainder is 1, so 3 is not a divisor of 5035)
  • ...
  • 5035 / 69 = 72.971014492754 (the remainder is 67, so 69 is not a divisor of 5035)
  • 5035 / 70 = 71.928571428571 (the remainder is 65, so 70 is not a divisor of 5035)