What are the divisors of 4836?

1, 2, 3, 4, 6, 12, 13, 26, 31, 39, 52, 62, 78, 93, 124, 156, 186, 372, 403, 806, 1209, 1612, 2418, 4836

16 even divisors

2, 4, 6, 12, 26, 52, 62, 78, 124, 156, 186, 372, 806, 1612, 2418, 4836

8 odd divisors

1, 3, 13, 31, 39, 93, 403, 1209

How to compute the divisors of 4836?

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

  • 4836 / 1 = 4836 (the remainder is 0, so 1 is a divisor of 4836)
  • 4836 / 2 = 2418 (the remainder is 0, so 2 is a divisor of 4836)
  • 4836 / 3 = 1612 (the remainder is 0, so 3 is a divisor of 4836)
  • ...
  • 4836 / 4835 = 1.0002068252327 (the remainder is 1, so 4835 is not a divisor of 4836)
  • 4836 / 4836 = 1 (the remainder is 0, so 4836 is a divisor of 4836)

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 4836 (i.e. 69.541354602855). 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 )

  • 4836 / 1 = 4836 (the remainder is 0, so 1 and 4836 are divisors of 4836)
  • 4836 / 2 = 2418 (the remainder is 0, so 2 and 2418 are divisors of 4836)
  • 4836 / 3 = 1612 (the remainder is 0, so 3 and 1612 are divisors of 4836)
  • ...
  • 4836 / 68 = 71.117647058824 (the remainder is 8, so 68 is not a divisor of 4836)
  • 4836 / 69 = 70.086956521739 (the remainder is 6, so 69 is not a divisor of 4836)