What are the divisors of 4676?

1, 2, 4, 7, 14, 28, 167, 334, 668, 1169, 2338, 4676

8 even divisors

2, 4, 14, 28, 334, 668, 2338, 4676

4 odd divisors

1, 7, 167, 1169

How to compute the divisors of 4676?

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

  • 4676 / 1 = 4676 (the remainder is 0, so 1 is a divisor of 4676)
  • 4676 / 2 = 2338 (the remainder is 0, so 2 is a divisor of 4676)
  • 4676 / 3 = 1558.6666666667 (the remainder is 2, so 3 is not a divisor of 4676)
  • ...
  • 4676 / 4675 = 1.0002139037433 (the remainder is 1, so 4675 is not a divisor of 4676)
  • 4676 / 4676 = 1 (the remainder is 0, so 4676 is a divisor of 4676)

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 4676 (i.e. 68.381283989115). 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 )

  • 4676 / 1 = 4676 (the remainder is 0, so 1 and 4676 are divisors of 4676)
  • 4676 / 2 = 2338 (the remainder is 0, so 2 and 2338 are divisors of 4676)
  • 4676 / 3 = 1558.6666666667 (the remainder is 2, so 3 is not a divisor of 4676)
  • ...
  • 4676 / 67 = 69.791044776119 (the remainder is 53, so 67 is not a divisor of 4676)
  • 4676 / 68 = 68.764705882353 (the remainder is 52, so 68 is not a divisor of 4676)