What are the divisors of 3020?

1, 2, 4, 5, 10, 20, 151, 302, 604, 755, 1510, 3020

8 even divisors

2, 4, 10, 20, 302, 604, 1510, 3020

4 odd divisors

1, 5, 151, 755

How to compute the divisors of 3020?

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

  • 3020 / 1 = 3020 (the remainder is 0, so 1 is a divisor of 3020)
  • 3020 / 2 = 1510 (the remainder is 0, so 2 is a divisor of 3020)
  • 3020 / 3 = 1006.6666666667 (the remainder is 2, so 3 is not a divisor of 3020)
  • ...
  • 3020 / 3019 = 1.0003312355084 (the remainder is 1, so 3019 is not a divisor of 3020)
  • 3020 / 3020 = 1 (the remainder is 0, so 3020 is a divisor of 3020)

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 3020 (i.e. 54.954526656136). 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 )

  • 3020 / 1 = 3020 (the remainder is 0, so 1 and 3020 are divisors of 3020)
  • 3020 / 2 = 1510 (the remainder is 0, so 2 and 1510 are divisors of 3020)
  • 3020 / 3 = 1006.6666666667 (the remainder is 2, so 3 is not a divisor of 3020)
  • ...
  • 3020 / 53 = 56.981132075472 (the remainder is 52, so 53 is not a divisor of 3020)
  • 3020 / 54 = 55.925925925926 (the remainder is 50, so 54 is not a divisor of 3020)