What are the divisors of 5236?

1, 2, 4, 7, 11, 14, 17, 22, 28, 34, 44, 68, 77, 119, 154, 187, 238, 308, 374, 476, 748, 1309, 2618, 5236

16 even divisors

2, 4, 14, 22, 28, 34, 44, 68, 154, 238, 308, 374, 476, 748, 2618, 5236

8 odd divisors

1, 7, 11, 17, 77, 119, 187, 1309

How to compute the divisors of 5236?

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

  • 5236 / 1 = 5236 (the remainder is 0, so 1 is a divisor of 5236)
  • 5236 / 2 = 2618 (the remainder is 0, so 2 is a divisor of 5236)
  • 5236 / 3 = 1745.3333333333 (the remainder is 1, so 3 is not a divisor of 5236)
  • ...
  • 5236 / 5235 = 1.0001910219675 (the remainder is 1, so 5235 is not a divisor of 5236)
  • 5236 / 5236 = 1 (the remainder is 0, so 5236 is a divisor of 5236)

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 5236 (i.e. 72.360210060502). 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 )

  • 5236 / 1 = 5236 (the remainder is 0, so 1 and 5236 are divisors of 5236)
  • 5236 / 2 = 2618 (the remainder is 0, so 2 and 2618 are divisors of 5236)
  • 5236 / 3 = 1745.3333333333 (the remainder is 1, so 3 is not a divisor of 5236)
  • ...
  • 5236 / 71 = 73.746478873239 (the remainder is 53, so 71 is not a divisor of 5236)
  • 5236 / 72 = 72.722222222222 (the remainder is 52, so 72 is not a divisor of 5236)