What are the divisors of 7020?

1, 2, 3, 4, 5, 6, 9, 10, 12, 13, 15, 18, 20, 26, 27, 30, 36, 39, 45, 52, 54, 60, 65, 78, 90, 108, 117, 130, 135, 156, 180, 195, 234, 260, 270, 351, 390, 468, 540, 585, 702, 780, 1170, 1404, 1755, 2340, 3510, 7020

32 even divisors

2, 4, 6, 10, 12, 18, 20, 26, 30, 36, 52, 54, 60, 78, 90, 108, 130, 156, 180, 234, 260, 270, 390, 468, 540, 702, 780, 1170, 1404, 2340, 3510, 7020

16 odd divisors

1, 3, 5, 9, 13, 15, 27, 39, 45, 65, 117, 135, 195, 351, 585, 1755

How to compute the divisors of 7020?

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

  • 7020 / 1 = 7020 (the remainder is 0, so 1 is a divisor of 7020)
  • 7020 / 2 = 3510 (the remainder is 0, so 2 is a divisor of 7020)
  • 7020 / 3 = 2340 (the remainder is 0, so 3 is a divisor of 7020)
  • ...
  • 7020 / 7019 = 1.0001424704374 (the remainder is 1, so 7019 is not a divisor of 7020)
  • 7020 / 7020 = 1 (the remainder is 0, so 7020 is a divisor of 7020)

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 7020 (i.e. 83.785440262614). 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 )

  • 7020 / 1 = 7020 (the remainder is 0, so 1 and 7020 are divisors of 7020)
  • 7020 / 2 = 3510 (the remainder is 0, so 2 and 3510 are divisors of 7020)
  • 7020 / 3 = 2340 (the remainder is 0, so 3 and 2340 are divisors of 7020)
  • ...
  • 7020 / 82 = 85.609756097561 (the remainder is 50, so 82 is not a divisor of 7020)
  • 7020 / 83 = 84.578313253012 (the remainder is 48, so 83 is not a divisor of 7020)