What are the divisors of 4312?

1, 2, 4, 7, 8, 11, 14, 22, 28, 44, 49, 56, 77, 88, 98, 154, 196, 308, 392, 539, 616, 1078, 2156, 4312

18 even divisors

2, 4, 8, 14, 22, 28, 44, 56, 88, 98, 154, 196, 308, 392, 616, 1078, 2156, 4312

6 odd divisors

1, 7, 11, 49, 77, 539

How to compute the divisors of 4312?

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

  • 4312 / 1 = 4312 (the remainder is 0, so 1 is a divisor of 4312)
  • 4312 / 2 = 2156 (the remainder is 0, so 2 is a divisor of 4312)
  • 4312 / 3 = 1437.3333333333 (the remainder is 1, so 3 is not a divisor of 4312)
  • ...
  • 4312 / 4311 = 1.0002319647414 (the remainder is 1, so 4311 is not a divisor of 4312)
  • 4312 / 4312 = 1 (the remainder is 0, so 4312 is a divisor of 4312)

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 4312 (i.e. 65.665820637528). 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 )

  • 4312 / 1 = 4312 (the remainder is 0, so 1 and 4312 are divisors of 4312)
  • 4312 / 2 = 2156 (the remainder is 0, so 2 and 2156 are divisors of 4312)
  • 4312 / 3 = 1437.3333333333 (the remainder is 1, so 3 is not a divisor of 4312)
  • ...
  • 4312 / 64 = 67.375 (the remainder is 24, so 64 is not a divisor of 4312)
  • 4312 / 65 = 66.338461538462 (the remainder is 22, so 65 is not a divisor of 4312)