What are the divisors of 3666?

1, 2, 3, 6, 13, 26, 39, 47, 78, 94, 141, 282, 611, 1222, 1833, 3666

8 even divisors

2, 6, 26, 78, 94, 282, 1222, 3666

8 odd divisors

1, 3, 13, 39, 47, 141, 611, 1833

How to compute the divisors of 3666?

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

  • 3666 / 1 = 3666 (the remainder is 0, so 1 is a divisor of 3666)
  • 3666 / 2 = 1833 (the remainder is 0, so 2 is a divisor of 3666)
  • 3666 / 3 = 1222 (the remainder is 0, so 3 is a divisor of 3666)
  • ...
  • 3666 / 3665 = 1.000272851296 (the remainder is 1, so 3665 is not a divisor of 3666)
  • 3666 / 3666 = 1 (the remainder is 0, so 3666 is a divisor of 3666)

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 3666 (i.e. 60.547502012882). 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 )

  • 3666 / 1 = 3666 (the remainder is 0, so 1 and 3666 are divisors of 3666)
  • 3666 / 2 = 1833 (the remainder is 0, so 2 and 1833 are divisors of 3666)
  • 3666 / 3 = 1222 (the remainder is 0, so 3 and 1222 are divisors of 3666)
  • ...
  • 3666 / 59 = 62.135593220339 (the remainder is 8, so 59 is not a divisor of 3666)
  • 3666 / 60 = 61.1 (the remainder is 6, so 60 is not a divisor of 3666)