What are the divisors of 2280?

1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 19, 20, 24, 30, 38, 40, 57, 60, 76, 95, 114, 120, 152, 190, 228, 285, 380, 456, 570, 760, 1140, 2280

24 even divisors

2, 4, 6, 8, 10, 12, 20, 24, 30, 38, 40, 60, 76, 114, 120, 152, 190, 228, 380, 456, 570, 760, 1140, 2280

8 odd divisors

1, 3, 5, 15, 19, 57, 95, 285

How to compute the divisors of 2280?

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

  • 2280 / 1 = 2280 (the remainder is 0, so 1 is a divisor of 2280)
  • 2280 / 2 = 1140 (the remainder is 0, so 2 is a divisor of 2280)
  • 2280 / 3 = 760 (the remainder is 0, so 3 is a divisor of 2280)
  • ...
  • 2280 / 2279 = 1.0004387889425 (the remainder is 1, so 2279 is not a divisor of 2280)
  • 2280 / 2280 = 1 (the remainder is 0, so 2280 is a divisor of 2280)

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 2280 (i.e. 47.749345545253). 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 )

  • 2280 / 1 = 2280 (the remainder is 0, so 1 and 2280 are divisors of 2280)
  • 2280 / 2 = 1140 (the remainder is 0, so 2 and 1140 are divisors of 2280)
  • 2280 / 3 = 760 (the remainder is 0, so 3 and 760 are divisors of 2280)
  • ...
  • 2280 / 46 = 49.565217391304 (the remainder is 26, so 46 is not a divisor of 2280)
  • 2280 / 47 = 48.510638297872 (the remainder is 24, so 47 is not a divisor of 2280)