What are the divisors of 4180?

1, 2, 4, 5, 10, 11, 19, 20, 22, 38, 44, 55, 76, 95, 110, 190, 209, 220, 380, 418, 836, 1045, 2090, 4180

16 even divisors

2, 4, 10, 20, 22, 38, 44, 76, 110, 190, 220, 380, 418, 836, 2090, 4180

8 odd divisors

1, 5, 11, 19, 55, 95, 209, 1045

How to compute the divisors of 4180?

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

  • 4180 / 1 = 4180 (the remainder is 0, so 1 is a divisor of 4180)
  • 4180 / 2 = 2090 (the remainder is 0, so 2 is a divisor of 4180)
  • 4180 / 3 = 1393.3333333333 (the remainder is 1, so 3 is not a divisor of 4180)
  • ...
  • 4180 / 4179 = 1.0002392916966 (the remainder is 1, so 4179 is not a divisor of 4180)
  • 4180 / 4180 = 1 (the remainder is 0, so 4180 is a divisor of 4180)

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 4180 (i.e. 64.652919500978). 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 )

  • 4180 / 1 = 4180 (the remainder is 0, so 1 and 4180 are divisors of 4180)
  • 4180 / 2 = 2090 (the remainder is 0, so 2 and 2090 are divisors of 4180)
  • 4180 / 3 = 1393.3333333333 (the remainder is 1, so 3 is not a divisor of 4180)
  • ...
  • 4180 / 63 = 66.349206349206 (the remainder is 22, so 63 is not a divisor of 4180)
  • 4180 / 64 = 65.3125 (the remainder is 20, so 64 is not a divisor of 4180)