What are the divisors of 5960?

1, 2, 4, 5, 8, 10, 20, 40, 149, 298, 596, 745, 1192, 1490, 2980, 5960

12 even divisors

2, 4, 8, 10, 20, 40, 298, 596, 1192, 1490, 2980, 5960

4 odd divisors

1, 5, 149, 745

How to compute the divisors of 5960?

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

  • 5960 / 1 = 5960 (the remainder is 0, so 1 is a divisor of 5960)
  • 5960 / 2 = 2980 (the remainder is 0, so 2 is a divisor of 5960)
  • 5960 / 3 = 1986.6666666667 (the remainder is 2, so 3 is not a divisor of 5960)
  • ...
  • 5960 / 5959 = 1.0001678133915 (the remainder is 1, so 5959 is not a divisor of 5960)
  • 5960 / 5960 = 1 (the remainder is 0, so 5960 is a divisor of 5960)

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 5960 (i.e. 77.201036262475). 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 )

  • 5960 / 1 = 5960 (the remainder is 0, so 1 and 5960 are divisors of 5960)
  • 5960 / 2 = 2980 (the remainder is 0, so 2 and 2980 are divisors of 5960)
  • 5960 / 3 = 1986.6666666667 (the remainder is 2, so 3 is not a divisor of 5960)
  • ...
  • 5960 / 76 = 78.421052631579 (the remainder is 32, so 76 is not a divisor of 5960)
  • 5960 / 77 = 77.402597402597 (the remainder is 31, so 77 is not a divisor of 5960)