What are the divisors of 8176?

1, 2, 4, 7, 8, 14, 16, 28, 56, 73, 112, 146, 292, 511, 584, 1022, 1168, 2044, 4088, 8176

16 even divisors

2, 4, 8, 14, 16, 28, 56, 112, 146, 292, 584, 1022, 1168, 2044, 4088, 8176

4 odd divisors

1, 7, 73, 511

How to compute the divisors of 8176?

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

  • 8176 / 1 = 8176 (the remainder is 0, so 1 is a divisor of 8176)
  • 8176 / 2 = 4088 (the remainder is 0, so 2 is a divisor of 8176)
  • 8176 / 3 = 2725.3333333333 (the remainder is 1, so 3 is not a divisor of 8176)
  • ...
  • 8176 / 8175 = 1.000122324159 (the remainder is 1, so 8175 is not a divisor of 8176)
  • 8176 / 8176 = 1 (the remainder is 0, so 8176 is a divisor of 8176)

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 8176 (i.e. 90.421236443659). 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 )

  • 8176 / 1 = 8176 (the remainder is 0, so 1 and 8176 are divisors of 8176)
  • 8176 / 2 = 4088 (the remainder is 0, so 2 and 4088 are divisors of 8176)
  • 8176 / 3 = 2725.3333333333 (the remainder is 1, so 3 is not a divisor of 8176)
  • ...
  • 8176 / 89 = 91.865168539326 (the remainder is 77, so 89 is not a divisor of 8176)
  • 8176 / 90 = 90.844444444444 (the remainder is 76, so 90 is not a divisor of 8176)