What are the divisors of 8148?

1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84, 97, 194, 291, 388, 582, 679, 1164, 1358, 2037, 2716, 4074, 8148

16 even divisors

2, 4, 6, 12, 14, 28, 42, 84, 194, 388, 582, 1164, 1358, 2716, 4074, 8148

8 odd divisors

1, 3, 7, 21, 97, 291, 679, 2037

How to compute the divisors of 8148?

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

  • 8148 / 1 = 8148 (the remainder is 0, so 1 is a divisor of 8148)
  • 8148 / 2 = 4074 (the remainder is 0, so 2 is a divisor of 8148)
  • 8148 / 3 = 2716 (the remainder is 0, so 3 is a divisor of 8148)
  • ...
  • 8148 / 8147 = 1.0001227445686 (the remainder is 1, so 8147 is not a divisor of 8148)
  • 8148 / 8148 = 1 (the remainder is 0, so 8148 is a divisor of 8148)

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 8148 (i.e. 90.266272771174). 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 )

  • 8148 / 1 = 8148 (the remainder is 0, so 1 and 8148 are divisors of 8148)
  • 8148 / 2 = 4074 (the remainder is 0, so 2 and 4074 are divisors of 8148)
  • 8148 / 3 = 2716 (the remainder is 0, so 3 and 2716 are divisors of 8148)
  • ...
  • 8148 / 89 = 91.550561797753 (the remainder is 49, so 89 is not a divisor of 8148)
  • 8148 / 90 = 90.533333333333 (the remainder is 48, so 90 is not a divisor of 8148)