What are the divisors of 4590?

1, 2, 3, 5, 6, 9, 10, 15, 17, 18, 27, 30, 34, 45, 51, 54, 85, 90, 102, 135, 153, 170, 255, 270, 306, 459, 510, 765, 918, 1530, 2295, 4590

16 even divisors

2, 6, 10, 18, 30, 34, 54, 90, 102, 170, 270, 306, 510, 918, 1530, 4590

16 odd divisors

1, 3, 5, 9, 15, 17, 27, 45, 51, 85, 135, 153, 255, 459, 765, 2295

How to compute the divisors of 4590?

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

  • 4590 / 1 = 4590 (the remainder is 0, so 1 is a divisor of 4590)
  • 4590 / 2 = 2295 (the remainder is 0, so 2 is a divisor of 4590)
  • 4590 / 3 = 1530 (the remainder is 0, so 3 is a divisor of 4590)
  • ...
  • 4590 / 4589 = 1.0002179123992 (the remainder is 1, so 4589 is not a divisor of 4590)
  • 4590 / 4590 = 1 (the remainder is 0, so 4590 is a divisor of 4590)

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 4590 (i.e. 67.749538743817). 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 )

  • 4590 / 1 = 4590 (the remainder is 0, so 1 and 4590 are divisors of 4590)
  • 4590 / 2 = 2295 (the remainder is 0, so 2 and 2295 are divisors of 4590)
  • 4590 / 3 = 1530 (the remainder is 0, so 3 and 1530 are divisors of 4590)
  • ...
  • 4590 / 66 = 69.545454545455 (the remainder is 36, so 66 is not a divisor of 4590)
  • 4590 / 67 = 68.507462686567 (the remainder is 34, so 67 is not a divisor of 4590)