What are the divisors of 3390?

1, 2, 3, 5, 6, 10, 15, 30, 113, 226, 339, 565, 678, 1130, 1695, 3390

8 even divisors

2, 6, 10, 30, 226, 678, 1130, 3390

8 odd divisors

1, 3, 5, 15, 113, 339, 565, 1695

How to compute the divisors of 3390?

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

  • 3390 / 1 = 3390 (the remainder is 0, so 1 is a divisor of 3390)
  • 3390 / 2 = 1695 (the remainder is 0, so 2 is a divisor of 3390)
  • 3390 / 3 = 1130 (the remainder is 0, so 3 is a divisor of 3390)
  • ...
  • 3390 / 3389 = 1.0002950722927 (the remainder is 1, so 3389 is not a divisor of 3390)
  • 3390 / 3390 = 1 (the remainder is 0, so 3390 is a divisor of 3390)

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 3390 (i.e. 58.223706512039). 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 )

  • 3390 / 1 = 3390 (the remainder is 0, so 1 and 3390 are divisors of 3390)
  • 3390 / 2 = 1695 (the remainder is 0, so 2 and 1695 are divisors of 3390)
  • 3390 / 3 = 1130 (the remainder is 0, so 3 and 1130 are divisors of 3390)
  • ...
  • 3390 / 57 = 59.473684210526 (the remainder is 27, so 57 is not a divisor of 3390)
  • 3390 / 58 = 58.448275862069 (the remainder is 26, so 58 is not a divisor of 3390)