What are the divisors of 181?

1, 181

2 odd divisors

1, 181

How to compute the divisors of 181?

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

  • 181 / 1 = 181 (the remainder is 0, so 1 is a divisor of 181)
  • 181 / 2 = 90.5 (the remainder is 1, so 2 is not a divisor of 181)
  • 181 / 3 = 60.333333333333 (the remainder is 1, so 3 is not a divisor of 181)
  • ...
  • 181 / 180 = 1.0055555555556 (the remainder is 1, so 180 is not a divisor of 181)
  • 181 / 181 = 1 (the remainder is 0, so 181 is a divisor of 181)

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 181 (i.e. 13.453624047074). 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 )

  • 181 / 1 = 181 (the remainder is 0, so 1 and 181 are divisors of 181)
  • 181 / 2 = 90.5 (the remainder is 1, so 2 is not a divisor of 181)
  • 181 / 3 = 60.333333333333 (the remainder is 1, so 3 is not a divisor of 181)
  • ...
  • 181 / 12 = 15.083333333333 (the remainder is 1, so 12 is not a divisor of 181)
  • 181 / 13 = 13.923076923077 (the remainder is 12, so 13 is not a divisor of 181)