What are the divisors of 3071?

1, 37, 83, 3071

4 odd divisors

1, 37, 83, 3071

How to compute the divisors of 3071?

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

  • 3071 / 1 = 3071 (the remainder is 0, so 1 is a divisor of 3071)
  • 3071 / 2 = 1535.5 (the remainder is 1, so 2 is not a divisor of 3071)
  • 3071 / 3 = 1023.6666666667 (the remainder is 2, so 3 is not a divisor of 3071)
  • ...
  • 3071 / 3070 = 1.000325732899 (the remainder is 1, so 3070 is not a divisor of 3071)
  • 3071 / 3071 = 1 (the remainder is 0, so 3071 is a divisor of 3071)

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 3071 (i.e. 55.41660400999). 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 )

  • 3071 / 1 = 3071 (the remainder is 0, so 1 and 3071 are divisors of 3071)
  • 3071 / 2 = 1535.5 (the remainder is 1, so 2 is not a divisor of 3071)
  • 3071 / 3 = 1023.6666666667 (the remainder is 2, so 3 is not a divisor of 3071)
  • ...
  • 3071 / 54 = 56.87037037037 (the remainder is 47, so 54 is not a divisor of 3071)
  • 3071 / 55 = 55.836363636364 (the remainder is 46, so 55 is not a divisor of 3071)