What are the divisors of 3504?

1, 2, 3, 4, 6, 8, 12, 16, 24, 48, 73, 146, 219, 292, 438, 584, 876, 1168, 1752, 3504

16 even divisors

2, 4, 6, 8, 12, 16, 24, 48, 146, 292, 438, 584, 876, 1168, 1752, 3504

4 odd divisors

1, 3, 73, 219

How to compute the divisors of 3504?

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

  • 3504 / 1 = 3504 (the remainder is 0, so 1 is a divisor of 3504)
  • 3504 / 2 = 1752 (the remainder is 0, so 2 is a divisor of 3504)
  • 3504 / 3 = 1168 (the remainder is 0, so 3 is a divisor of 3504)
  • ...
  • 3504 / 3503 = 1.0002854695975 (the remainder is 1, so 3503 is not a divisor of 3504)
  • 3504 / 3504 = 1 (the remainder is 0, so 3504 is a divisor of 3504)

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 3504 (i.e. 59.194594347795). 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 )

  • 3504 / 1 = 3504 (the remainder is 0, so 1 and 3504 are divisors of 3504)
  • 3504 / 2 = 1752 (the remainder is 0, so 2 and 1752 are divisors of 3504)
  • 3504 / 3 = 1168 (the remainder is 0, so 3 and 1168 are divisors of 3504)
  • ...
  • 3504 / 58 = 60.413793103448 (the remainder is 24, so 58 is not a divisor of 3504)
  • 3504 / 59 = 59.389830508475 (the remainder is 23, so 59 is not a divisor of 3504)