What are the divisors of 4088?

1, 2, 4, 7, 8, 14, 28, 56, 73, 146, 292, 511, 584, 1022, 2044, 4088

12 even divisors

2, 4, 8, 14, 28, 56, 146, 292, 584, 1022, 2044, 4088

4 odd divisors

1, 7, 73, 511

How to compute the divisors of 4088?

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

  • 4088 / 1 = 4088 (the remainder is 0, so 1 is a divisor of 4088)
  • 4088 / 2 = 2044 (the remainder is 0, so 2 is a divisor of 4088)
  • 4088 / 3 = 1362.6666666667 (the remainder is 2, so 3 is not a divisor of 4088)
  • ...
  • 4088 / 4087 = 1.0002446782481 (the remainder is 1, so 4087 is not a divisor of 4088)
  • 4088 / 4088 = 1 (the remainder is 0, so 4088 is a divisor of 4088)

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 4088 (i.e. 63.937469452583). 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 )

  • 4088 / 1 = 4088 (the remainder is 0, so 1 and 4088 are divisors of 4088)
  • 4088 / 2 = 2044 (the remainder is 0, so 2 and 2044 are divisors of 4088)
  • 4088 / 3 = 1362.6666666667 (the remainder is 2, so 3 is not a divisor of 4088)
  • ...
  • 4088 / 62 = 65.935483870968 (the remainder is 58, so 62 is not a divisor of 4088)
  • 4088 / 63 = 64.888888888889 (the remainder is 56, so 63 is not a divisor of 4088)