What are the divisors of 7032?

1, 2, 3, 4, 6, 8, 12, 24, 293, 586, 879, 1172, 1758, 2344, 3516, 7032

12 even divisors

2, 4, 6, 8, 12, 24, 586, 1172, 1758, 2344, 3516, 7032

4 odd divisors

1, 3, 293, 879

How to compute the divisors of 7032?

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

  • 7032 / 1 = 7032 (the remainder is 0, so 1 is a divisor of 7032)
  • 7032 / 2 = 3516 (the remainder is 0, so 2 is a divisor of 7032)
  • 7032 / 3 = 2344 (the remainder is 0, so 3 is a divisor of 7032)
  • ...
  • 7032 / 7031 = 1.0001422272792 (the remainder is 1, so 7031 is not a divisor of 7032)
  • 7032 / 7032 = 1 (the remainder is 0, so 7032 is a divisor of 7032)

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 7032 (i.e. 83.857021172947). 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 )

  • 7032 / 1 = 7032 (the remainder is 0, so 1 and 7032 are divisors of 7032)
  • 7032 / 2 = 3516 (the remainder is 0, so 2 and 3516 are divisors of 7032)
  • 7032 / 3 = 2344 (the remainder is 0, so 3 and 2344 are divisors of 7032)
  • ...
  • 7032 / 82 = 85.756097560976 (the remainder is 62, so 82 is not a divisor of 7032)
  • 7032 / 83 = 84.722891566265 (the remainder is 60, so 83 is not a divisor of 7032)