What are the divisors of 2940?

1, 2, 3, 4, 5, 6, 7, 10, 12, 14, 15, 20, 21, 28, 30, 35, 42, 49, 60, 70, 84, 98, 105, 140, 147, 196, 210, 245, 294, 420, 490, 588, 735, 980, 1470, 2940

24 even divisors

2, 4, 6, 10, 12, 14, 20, 28, 30, 42, 60, 70, 84, 98, 140, 196, 210, 294, 420, 490, 588, 980, 1470, 2940

12 odd divisors

1, 3, 5, 7, 15, 21, 35, 49, 105, 147, 245, 735

How to compute the divisors of 2940?

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

  • 2940 / 1 = 2940 (the remainder is 0, so 1 is a divisor of 2940)
  • 2940 / 2 = 1470 (the remainder is 0, so 2 is a divisor of 2940)
  • 2940 / 3 = 980 (the remainder is 0, so 3 is a divisor of 2940)
  • ...
  • 2940 / 2939 = 1.0003402517863 (the remainder is 1, so 2939 is not a divisor of 2940)
  • 2940 / 2940 = 1 (the remainder is 0, so 2940 is a divisor of 2940)

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 2940 (i.e. 54.221766846904). 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 )

  • 2940 / 1 = 2940 (the remainder is 0, so 1 and 2940 are divisors of 2940)
  • 2940 / 2 = 1470 (the remainder is 0, so 2 and 1470 are divisors of 2940)
  • 2940 / 3 = 980 (the remainder is 0, so 3 and 980 are divisors of 2940)
  • ...
  • 2940 / 53 = 55.471698113208 (the remainder is 25, so 53 is not a divisor of 2940)
  • 2940 / 54 = 54.444444444444 (the remainder is 24, so 54 is not a divisor of 2940)