What are the divisors of 2835?

1, 3, 5, 7, 9, 15, 21, 27, 35, 45, 63, 81, 105, 135, 189, 315, 405, 567, 945, 2835

20 odd divisors

1, 3, 5, 7, 9, 15, 21, 27, 35, 45, 63, 81, 105, 135, 189, 315, 405, 567, 945, 2835

How to compute the divisors of 2835?

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

  • 2835 / 1 = 2835 (the remainder is 0, so 1 is a divisor of 2835)
  • 2835 / 2 = 1417.5 (the remainder is 1, so 2 is not a divisor of 2835)
  • 2835 / 3 = 945 (the remainder is 0, so 3 is a divisor of 2835)
  • ...
  • 2835 / 2834 = 1.000352858151 (the remainder is 1, so 2834 is not a divisor of 2835)
  • 2835 / 2835 = 1 (the remainder is 0, so 2835 is a divisor of 2835)

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 2835 (i.e. 53.244718047897). 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 )

  • 2835 / 1 = 2835 (the remainder is 0, so 1 and 2835 are divisors of 2835)
  • 2835 / 2 = 1417.5 (the remainder is 1, so 2 is not a divisor of 2835)
  • 2835 / 3 = 945 (the remainder is 0, so 3 and 945 are divisors of 2835)
  • ...
  • 2835 / 52 = 54.519230769231 (the remainder is 27, so 52 is not a divisor of 2835)
  • 2835 / 53 = 53.490566037736 (the remainder is 26, so 53 is not a divisor of 2835)