What are the divisors of 5730?

1, 2, 3, 5, 6, 10, 15, 30, 191, 382, 573, 955, 1146, 1910, 2865, 5730

8 even divisors

2, 6, 10, 30, 382, 1146, 1910, 5730

8 odd divisors

1, 3, 5, 15, 191, 573, 955, 2865

How to compute the divisors of 5730?

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

  • 5730 / 1 = 5730 (the remainder is 0, so 1 is a divisor of 5730)
  • 5730 / 2 = 2865 (the remainder is 0, so 2 is a divisor of 5730)
  • 5730 / 3 = 1910 (the remainder is 0, so 3 is a divisor of 5730)
  • ...
  • 5730 / 5729 = 1.0001745505324 (the remainder is 1, so 5729 is not a divisor of 5730)
  • 5730 / 5730 = 1 (the remainder is 0, so 5730 is a divisor of 5730)

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 5730 (i.e. 75.696763471102). 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 )

  • 5730 / 1 = 5730 (the remainder is 0, so 1 and 5730 are divisors of 5730)
  • 5730 / 2 = 2865 (the remainder is 0, so 2 and 2865 are divisors of 5730)
  • 5730 / 3 = 1910 (the remainder is 0, so 3 and 1910 are divisors of 5730)
  • ...
  • 5730 / 74 = 77.432432432432 (the remainder is 32, so 74 is not a divisor of 5730)
  • 5730 / 75 = 76.4 (the remainder is 30, so 75 is not a divisor of 5730)