What are the divisors of 3420?

1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 19, 20, 30, 36, 38, 45, 57, 60, 76, 90, 95, 114, 171, 180, 190, 228, 285, 342, 380, 570, 684, 855, 1140, 1710, 3420

24 even divisors

2, 4, 6, 10, 12, 18, 20, 30, 36, 38, 60, 76, 90, 114, 180, 190, 228, 342, 380, 570, 684, 1140, 1710, 3420

12 odd divisors

1, 3, 5, 9, 15, 19, 45, 57, 95, 171, 285, 855

How to compute the divisors of 3420?

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

  • 3420 / 1 = 3420 (the remainder is 0, so 1 is a divisor of 3420)
  • 3420 / 2 = 1710 (the remainder is 0, so 2 is a divisor of 3420)
  • 3420 / 3 = 1140 (the remainder is 0, so 3 is a divisor of 3420)
  • ...
  • 3420 / 3419 = 1.0002924831822 (the remainder is 1, so 3419 is not a divisor of 3420)
  • 3420 / 3420 = 1 (the remainder is 0, so 3420 is a divisor of 3420)

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 3420 (i.e. 58.480766068854). 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 )

  • 3420 / 1 = 3420 (the remainder is 0, so 1 and 3420 are divisors of 3420)
  • 3420 / 2 = 1710 (the remainder is 0, so 2 and 1710 are divisors of 3420)
  • 3420 / 3 = 1140 (the remainder is 0, so 3 and 1140 are divisors of 3420)
  • ...
  • 3420 / 57 = 60 (the remainder is 0, so 57 and 60 are divisors of 3420)
  • 3420 / 58 = 58.965517241379 (the remainder is 56, so 58 is not a divisor of 3420)