What are the divisors of 4854?

1, 2, 3, 6, 809, 1618, 2427, 4854

4 even divisors

2, 6, 1618, 4854

4 odd divisors

1, 3, 809, 2427

How to compute the divisors of 4854?

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

  • 4854 / 1 = 4854 (the remainder is 0, so 1 is a divisor of 4854)
  • 4854 / 2 = 2427 (the remainder is 0, so 2 is a divisor of 4854)
  • 4854 / 3 = 1618 (the remainder is 0, so 3 is a divisor of 4854)
  • ...
  • 4854 / 4853 = 1.0002060581084 (the remainder is 1, so 4853 is not a divisor of 4854)
  • 4854 / 4854 = 1 (the remainder is 0, so 4854 is a divisor of 4854)

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 4854 (i.e. 69.670653793401). 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 )

  • 4854 / 1 = 4854 (the remainder is 0, so 1 and 4854 are divisors of 4854)
  • 4854 / 2 = 2427 (the remainder is 0, so 2 and 2427 are divisors of 4854)
  • 4854 / 3 = 1618 (the remainder is 0, so 3 and 1618 are divisors of 4854)
  • ...
  • 4854 / 68 = 71.382352941176 (the remainder is 26, so 68 is not a divisor of 4854)
  • 4854 / 69 = 70.347826086957 (the remainder is 24, so 69 is not a divisor of 4854)