What are the divisors of 4790?

1, 2, 5, 10, 479, 958, 2395, 4790

4 even divisors

2, 10, 958, 4790

4 odd divisors

1, 5, 479, 2395

How to compute the divisors of 4790?

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

  • 4790 / 1 = 4790 (the remainder is 0, so 1 is a divisor of 4790)
  • 4790 / 2 = 2395 (the remainder is 0, so 2 is a divisor of 4790)
  • 4790 / 3 = 1596.6666666667 (the remainder is 2, so 3 is not a divisor of 4790)
  • ...
  • 4790 / 4789 = 1.0002088118605 (the remainder is 1, so 4789 is not a divisor of 4790)
  • 4790 / 4790 = 1 (the remainder is 0, so 4790 is a divisor of 4790)

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 4790 (i.e. 69.209825891993). 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 )

  • 4790 / 1 = 4790 (the remainder is 0, so 1 and 4790 are divisors of 4790)
  • 4790 / 2 = 2395 (the remainder is 0, so 2 and 2395 are divisors of 4790)
  • 4790 / 3 = 1596.6666666667 (the remainder is 2, so 3 is not a divisor of 4790)
  • ...
  • 4790 / 68 = 70.441176470588 (the remainder is 30, so 68 is not a divisor of 4790)
  • 4790 / 69 = 69.420289855072 (the remainder is 29, so 69 is not a divisor of 4790)