What are the divisors of 8088?

1, 2, 3, 4, 6, 8, 12, 24, 337, 674, 1011, 1348, 2022, 2696, 4044, 8088

12 even divisors

2, 4, 6, 8, 12, 24, 674, 1348, 2022, 2696, 4044, 8088

4 odd divisors

1, 3, 337, 1011

How to compute the divisors of 8088?

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

  • 8088 / 1 = 8088 (the remainder is 0, so 1 is a divisor of 8088)
  • 8088 / 2 = 4044 (the remainder is 0, so 2 is a divisor of 8088)
  • 8088 / 3 = 2696 (the remainder is 0, so 3 is a divisor of 8088)
  • ...
  • 8088 / 8087 = 1.0001236552492 (the remainder is 1, so 8087 is not a divisor of 8088)
  • 8088 / 8088 = 1 (the remainder is 0, so 8088 is a divisor of 8088)

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 8088 (i.e. 89.933308623668). 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 )

  • 8088 / 1 = 8088 (the remainder is 0, so 1 and 8088 are divisors of 8088)
  • 8088 / 2 = 4044 (the remainder is 0, so 2 and 4044 are divisors of 8088)
  • 8088 / 3 = 2696 (the remainder is 0, so 3 and 2696 are divisors of 8088)
  • ...
  • 8088 / 88 = 91.909090909091 (the remainder is 80, so 88 is not a divisor of 8088)
  • 8088 / 89 = 90.876404494382 (the remainder is 78, so 89 is not a divisor of 8088)