What are the divisors of 4998?

1, 2, 3, 6, 7, 14, 17, 21, 34, 42, 49, 51, 98, 102, 119, 147, 238, 294, 357, 714, 833, 1666, 2499, 4998

12 even divisors

2, 6, 14, 34, 42, 98, 102, 238, 294, 714, 1666, 4998

12 odd divisors

1, 3, 7, 17, 21, 49, 51, 119, 147, 357, 833, 2499

How to compute the divisors of 4998?

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

  • 4998 / 1 = 4998 (the remainder is 0, so 1 is a divisor of 4998)
  • 4998 / 2 = 2499 (the remainder is 0, so 2 is a divisor of 4998)
  • 4998 / 3 = 1666 (the remainder is 0, so 3 is a divisor of 4998)
  • ...
  • 4998 / 4997 = 1.000200120072 (the remainder is 1, so 4997 is not a divisor of 4998)
  • 4998 / 4998 = 1 (the remainder is 0, so 4998 is a divisor of 4998)

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 4998 (i.e. 70.696534568535). 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 )

  • 4998 / 1 = 4998 (the remainder is 0, so 1 and 4998 are divisors of 4998)
  • 4998 / 2 = 2499 (the remainder is 0, so 2 and 2499 are divisors of 4998)
  • 4998 / 3 = 1666 (the remainder is 0, so 3 and 1666 are divisors of 4998)
  • ...
  • 4998 / 69 = 72.434782608696 (the remainder is 30, so 69 is not a divisor of 4998)
  • 4998 / 70 = 71.4 (the remainder is 28, so 70 is not a divisor of 4998)