What are the divisors of 3150?

1, 2, 3, 5, 6, 7, 9, 10, 14, 15, 18, 21, 25, 30, 35, 42, 45, 50, 63, 70, 75, 90, 105, 126, 150, 175, 210, 225, 315, 350, 450, 525, 630, 1050, 1575, 3150

18 even divisors

2, 6, 10, 14, 18, 30, 42, 50, 70, 90, 126, 150, 210, 350, 450, 630, 1050, 3150

18 odd divisors

1, 3, 5, 7, 9, 15, 21, 25, 35, 45, 63, 75, 105, 175, 225, 315, 525, 1575

How to compute the divisors of 3150?

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

  • 3150 / 1 = 3150 (the remainder is 0, so 1 is a divisor of 3150)
  • 3150 / 2 = 1575 (the remainder is 0, so 2 is a divisor of 3150)
  • 3150 / 3 = 1050 (the remainder is 0, so 3 is a divisor of 3150)
  • ...
  • 3150 / 3149 = 1.0003175611305 (the remainder is 1, so 3149 is not a divisor of 3150)
  • 3150 / 3150 = 1 (the remainder is 0, so 3150 is a divisor of 3150)

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 3150 (i.e. 56.124860801609). 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 )

  • 3150 / 1 = 3150 (the remainder is 0, so 1 and 3150 are divisors of 3150)
  • 3150 / 2 = 1575 (the remainder is 0, so 2 and 1575 are divisors of 3150)
  • 3150 / 3 = 1050 (the remainder is 0, so 3 and 1050 are divisors of 3150)
  • ...
  • 3150 / 55 = 57.272727272727 (the remainder is 15, so 55 is not a divisor of 3150)
  • 3150 / 56 = 56.25 (the remainder is 14, so 56 is not a divisor of 3150)