What are the divisors of 4818?

1, 2, 3, 6, 11, 22, 33, 66, 73, 146, 219, 438, 803, 1606, 2409, 4818

8 even divisors

2, 6, 22, 66, 146, 438, 1606, 4818

8 odd divisors

1, 3, 11, 33, 73, 219, 803, 2409

How to compute the divisors of 4818?

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

  • 4818 / 1 = 4818 (the remainder is 0, so 1 is a divisor of 4818)
  • 4818 / 2 = 2409 (the remainder is 0, so 2 is a divisor of 4818)
  • 4818 / 3 = 1606 (the remainder is 0, so 3 is a divisor of 4818)
  • ...
  • 4818 / 4817 = 1.0002075980901 (the remainder is 1, so 4817 is not a divisor of 4818)
  • 4818 / 4818 = 1 (the remainder is 0, so 4818 is a divisor of 4818)

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 4818 (i.e. 69.411814556313). 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 )

  • 4818 / 1 = 4818 (the remainder is 0, so 1 and 4818 are divisors of 4818)
  • 4818 / 2 = 2409 (the remainder is 0, so 2 and 2409 are divisors of 4818)
  • 4818 / 3 = 1606 (the remainder is 0, so 3 and 1606 are divisors of 4818)
  • ...
  • 4818 / 68 = 70.852941176471 (the remainder is 58, so 68 is not a divisor of 4818)
  • 4818 / 69 = 69.826086956522 (the remainder is 57, so 69 is not a divisor of 4818)