What are the divisors of 1956?

1, 2, 3, 4, 6, 12, 163, 326, 489, 652, 978, 1956

8 even divisors

2, 4, 6, 12, 326, 652, 978, 1956

4 odd divisors

1, 3, 163, 489

How to compute the divisors of 1956?

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

  • 1956 / 1 = 1956 (the remainder is 0, so 1 is a divisor of 1956)
  • 1956 / 2 = 978 (the remainder is 0, so 2 is a divisor of 1956)
  • 1956 / 3 = 652 (the remainder is 0, so 3 is a divisor of 1956)
  • ...
  • 1956 / 1955 = 1.0005115089514 (the remainder is 1, so 1955 is not a divisor of 1956)
  • 1956 / 1956 = 1 (the remainder is 0, so 1956 is a divisor of 1956)

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 1956 (i.e. 44.226688774992). 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 )

  • 1956 / 1 = 1956 (the remainder is 0, so 1 and 1956 are divisors of 1956)
  • 1956 / 2 = 978 (the remainder is 0, so 2 and 978 are divisors of 1956)
  • 1956 / 3 = 652 (the remainder is 0, so 3 and 652 are divisors of 1956)
  • ...
  • 1956 / 43 = 45.488372093023 (the remainder is 21, so 43 is not a divisor of 1956)
  • 1956 / 44 = 44.454545454545 (the remainder is 20, so 44 is not a divisor of 1956)