What are the divisors of 8190?

1, 2, 3, 5, 6, 7, 9, 10, 13, 14, 15, 18, 21, 26, 30, 35, 39, 42, 45, 63, 65, 70, 78, 90, 91, 105, 117, 126, 130, 182, 195, 210, 234, 273, 315, 390, 455, 546, 585, 630, 819, 910, 1170, 1365, 1638, 2730, 4095, 8190

24 even divisors

2, 6, 10, 14, 18, 26, 30, 42, 70, 78, 90, 126, 130, 182, 210, 234, 390, 546, 630, 910, 1170, 1638, 2730, 8190

24 odd divisors

1, 3, 5, 7, 9, 13, 15, 21, 35, 39, 45, 63, 65, 91, 105, 117, 195, 273, 315, 455, 585, 819, 1365, 4095

How to compute the divisors of 8190?

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

  • 8190 / 1 = 8190 (the remainder is 0, so 1 is a divisor of 8190)
  • 8190 / 2 = 4095 (the remainder is 0, so 2 is a divisor of 8190)
  • 8190 / 3 = 2730 (the remainder is 0, so 3 is a divisor of 8190)
  • ...
  • 8190 / 8189 = 1.0001221150324 (the remainder is 1, so 8189 is not a divisor of 8190)
  • 8190 / 8190 = 1 (the remainder is 0, so 8190 is a divisor of 8190)

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 8190 (i.e. 90.49861877399). 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 )

  • 8190 / 1 = 8190 (the remainder is 0, so 1 and 8190 are divisors of 8190)
  • 8190 / 2 = 4095 (the remainder is 0, so 2 and 4095 are divisors of 8190)
  • 8190 / 3 = 2730 (the remainder is 0, so 3 and 2730 are divisors of 8190)
  • ...
  • 8190 / 89 = 92.022471910112 (the remainder is 2, so 89 is not a divisor of 8190)
  • 8190 / 90 = 91 (the remainder is 0, so 90 and 91 are divisors of 8190)