What are the divisors of 5232?

1, 2, 3, 4, 6, 8, 12, 16, 24, 48, 109, 218, 327, 436, 654, 872, 1308, 1744, 2616, 5232

16 even divisors

2, 4, 6, 8, 12, 16, 24, 48, 218, 436, 654, 872, 1308, 1744, 2616, 5232

4 odd divisors

1, 3, 109, 327

How to compute the divisors of 5232?

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

  • 5232 / 1 = 5232 (the remainder is 0, so 1 is a divisor of 5232)
  • 5232 / 2 = 2616 (the remainder is 0, so 2 is a divisor of 5232)
  • 5232 / 3 = 1744 (the remainder is 0, so 3 is a divisor of 5232)
  • ...
  • 5232 / 5231 = 1.0001911680367 (the remainder is 1, so 5231 is not a divisor of 5232)
  • 5232 / 5232 = 1 (the remainder is 0, so 5232 is a divisor of 5232)

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 5232 (i.e. 72.3325652801). 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 )

  • 5232 / 1 = 5232 (the remainder is 0, so 1 and 5232 are divisors of 5232)
  • 5232 / 2 = 2616 (the remainder is 0, so 2 and 2616 are divisors of 5232)
  • 5232 / 3 = 1744 (the remainder is 0, so 3 and 1744 are divisors of 5232)
  • ...
  • 5232 / 71 = 73.69014084507 (the remainder is 49, so 71 is not a divisor of 5232)
  • 5232 / 72 = 72.666666666667 (the remainder is 48, so 72 is not a divisor of 5232)