What are the divisors of 4524?

1, 2, 3, 4, 6, 12, 13, 26, 29, 39, 52, 58, 78, 87, 116, 156, 174, 348, 377, 754, 1131, 1508, 2262, 4524

16 even divisors

2, 4, 6, 12, 26, 52, 58, 78, 116, 156, 174, 348, 754, 1508, 2262, 4524

8 odd divisors

1, 3, 13, 29, 39, 87, 377, 1131

How to compute the divisors of 4524?

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

  • 4524 / 1 = 4524 (the remainder is 0, so 1 is a divisor of 4524)
  • 4524 / 2 = 2262 (the remainder is 0, so 2 is a divisor of 4524)
  • 4524 / 3 = 1508 (the remainder is 0, so 3 is a divisor of 4524)
  • ...
  • 4524 / 4523 = 1.0002210921954 (the remainder is 1, so 4523 is not a divisor of 4524)
  • 4524 / 4524 = 1 (the remainder is 0, so 4524 is a divisor of 4524)

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 4524 (i.e. 67.260686883201). 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 )

  • 4524 / 1 = 4524 (the remainder is 0, so 1 and 4524 are divisors of 4524)
  • 4524 / 2 = 2262 (the remainder is 0, so 2 and 2262 are divisors of 4524)
  • 4524 / 3 = 1508 (the remainder is 0, so 3 and 1508 are divisors of 4524)
  • ...
  • 4524 / 66 = 68.545454545455 (the remainder is 36, so 66 is not a divisor of 4524)
  • 4524 / 67 = 67.522388059701 (the remainder is 35, so 67 is not a divisor of 4524)