What are the divisors of 2904?

1, 2, 3, 4, 6, 8, 11, 12, 22, 24, 33, 44, 66, 88, 121, 132, 242, 264, 363, 484, 726, 968, 1452, 2904

18 even divisors

2, 4, 6, 8, 12, 22, 24, 44, 66, 88, 132, 242, 264, 484, 726, 968, 1452, 2904

6 odd divisors

1, 3, 11, 33, 121, 363

How to compute the divisors of 2904?

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

  • 2904 / 1 = 2904 (the remainder is 0, so 1 is a divisor of 2904)
  • 2904 / 2 = 1452 (the remainder is 0, so 2 is a divisor of 2904)
  • 2904 / 3 = 968 (the remainder is 0, so 3 is a divisor of 2904)
  • ...
  • 2904 / 2903 = 1.0003444712367 (the remainder is 1, so 2903 is not a divisor of 2904)
  • 2904 / 2904 = 1 (the remainder is 0, so 2904 is a divisor of 2904)

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 2904 (i.e. 53.88877434123). 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 )

  • 2904 / 1 = 2904 (the remainder is 0, so 1 and 2904 are divisors of 2904)
  • 2904 / 2 = 1452 (the remainder is 0, so 2 and 1452 are divisors of 2904)
  • 2904 / 3 = 968 (the remainder is 0, so 3 and 968 are divisors of 2904)
  • ...
  • 2904 / 52 = 55.846153846154 (the remainder is 44, so 52 is not a divisor of 2904)
  • 2904 / 53 = 54.792452830189 (the remainder is 42, so 53 is not a divisor of 2904)