What are the divisors of 8028?

1, 2, 3, 4, 6, 9, 12, 18, 36, 223, 446, 669, 892, 1338, 2007, 2676, 4014, 8028

12 even divisors

2, 4, 6, 12, 18, 36, 446, 892, 1338, 2676, 4014, 8028

6 odd divisors

1, 3, 9, 223, 669, 2007

How to compute the divisors of 8028?

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

  • 8028 / 1 = 8028 (the remainder is 0, so 1 is a divisor of 8028)
  • 8028 / 2 = 4014 (the remainder is 0, so 2 is a divisor of 8028)
  • 8028 / 3 = 2676 (the remainder is 0, so 3 is a divisor of 8028)
  • ...
  • 8028 / 8027 = 1.000124579544 (the remainder is 1, so 8027 is not a divisor of 8028)
  • 8028 / 8028 = 1 (the remainder is 0, so 8028 is a divisor of 8028)

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 8028 (i.e. 89.599107138408). 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 )

  • 8028 / 1 = 8028 (the remainder is 0, so 1 and 8028 are divisors of 8028)
  • 8028 / 2 = 4014 (the remainder is 0, so 2 and 4014 are divisors of 8028)
  • 8028 / 3 = 2676 (the remainder is 0, so 3 and 2676 are divisors of 8028)
  • ...
  • 8028 / 88 = 91.227272727273 (the remainder is 20, so 88 is not a divisor of 8028)
  • 8028 / 89 = 90.202247191011 (the remainder is 18, so 89 is not a divisor of 8028)