What are the divisors of 5950?

1, 2, 5, 7, 10, 14, 17, 25, 34, 35, 50, 70, 85, 119, 170, 175, 238, 350, 425, 595, 850, 1190, 2975, 5950

12 even divisors

2, 10, 14, 34, 50, 70, 170, 238, 350, 850, 1190, 5950

12 odd divisors

1, 5, 7, 17, 25, 35, 85, 119, 175, 425, 595, 2975

How to compute the divisors of 5950?

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

  • 5950 / 1 = 5950 (the remainder is 0, so 1 is a divisor of 5950)
  • 5950 / 2 = 2975 (the remainder is 0, so 2 is a divisor of 5950)
  • 5950 / 3 = 1983.3333333333 (the remainder is 1, so 3 is not a divisor of 5950)
  • ...
  • 5950 / 5949 = 1.0001680954782 (the remainder is 1, so 5949 is not a divisor of 5950)
  • 5950 / 5950 = 1 (the remainder is 0, so 5950 is a divisor of 5950)

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 5950 (i.e. 77.136243102708). 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 )

  • 5950 / 1 = 5950 (the remainder is 0, so 1 and 5950 are divisors of 5950)
  • 5950 / 2 = 2975 (the remainder is 0, so 2 and 2975 are divisors of 5950)
  • 5950 / 3 = 1983.3333333333 (the remainder is 1, so 3 is not a divisor of 5950)
  • ...
  • 5950 / 76 = 78.289473684211 (the remainder is 22, so 76 is not a divisor of 5950)
  • 5950 / 77 = 77.272727272727 (the remainder is 21, so 77 is not a divisor of 5950)