What are the divisors of 7098?

1, 2, 3, 6, 7, 13, 14, 21, 26, 39, 42, 78, 91, 169, 182, 273, 338, 507, 546, 1014, 1183, 2366, 3549, 7098

12 even divisors

2, 6, 14, 26, 42, 78, 182, 338, 546, 1014, 2366, 7098

12 odd divisors

1, 3, 7, 13, 21, 39, 91, 169, 273, 507, 1183, 3549

How to compute the divisors of 7098?

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

  • 7098 / 1 = 7098 (the remainder is 0, so 1 is a divisor of 7098)
  • 7098 / 2 = 3549 (the remainder is 0, so 2 is a divisor of 7098)
  • 7098 / 3 = 2366 (the remainder is 0, so 3 is a divisor of 7098)
  • ...
  • 7098 / 7097 = 1.0001409046076 (the remainder is 1, so 7097 is not a divisor of 7098)
  • 7098 / 7098 = 1 (the remainder is 0, so 7098 is a divisor of 7098)

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 7098 (i.e. 84.249629079302). 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 )

  • 7098 / 1 = 7098 (the remainder is 0, so 1 and 7098 are divisors of 7098)
  • 7098 / 2 = 3549 (the remainder is 0, so 2 and 3549 are divisors of 7098)
  • 7098 / 3 = 2366 (the remainder is 0, so 3 and 2366 are divisors of 7098)
  • ...
  • 7098 / 83 = 85.518072289157 (the remainder is 43, so 83 is not a divisor of 7098)
  • 7098 / 84 = 84.5 (the remainder is 42, so 84 is not a divisor of 7098)