What are the divisors of 7030?

1, 2, 5, 10, 19, 37, 38, 74, 95, 185, 190, 370, 703, 1406, 3515, 7030

8 even divisors

2, 10, 38, 74, 190, 370, 1406, 7030

8 odd divisors

1, 5, 19, 37, 95, 185, 703, 3515

How to compute the divisors of 7030?

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

  • 7030 / 1 = 7030 (the remainder is 0, so 1 is a divisor of 7030)
  • 7030 / 2 = 3515 (the remainder is 0, so 2 is a divisor of 7030)
  • 7030 / 3 = 2343.3333333333 (the remainder is 1, so 3 is not a divisor of 7030)
  • ...
  • 7030 / 7029 = 1.0001422677479 (the remainder is 1, so 7029 is not a divisor of 7030)
  • 7030 / 7030 = 1 (the remainder is 0, so 7030 is a divisor of 7030)

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 7030 (i.e. 83.845095265018). 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 )

  • 7030 / 1 = 7030 (the remainder is 0, so 1 and 7030 are divisors of 7030)
  • 7030 / 2 = 3515 (the remainder is 0, so 2 and 3515 are divisors of 7030)
  • 7030 / 3 = 2343.3333333333 (the remainder is 1, so 3 is not a divisor of 7030)
  • ...
  • 7030 / 82 = 85.731707317073 (the remainder is 60, so 82 is not a divisor of 7030)
  • 7030 / 83 = 84.698795180723 (the remainder is 58, so 83 is not a divisor of 7030)