What are the divisors of 1368?

1, 2, 3, 4, 6, 8, 9, 12, 18, 19, 24, 36, 38, 57, 72, 76, 114, 152, 171, 228, 342, 456, 684, 1368

18 even divisors

2, 4, 6, 8, 12, 18, 24, 36, 38, 72, 76, 114, 152, 228, 342, 456, 684, 1368

6 odd divisors

1, 3, 9, 19, 57, 171

How to compute the divisors of 1368?

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

  • 1368 / 1 = 1368 (the remainder is 0, so 1 is a divisor of 1368)
  • 1368 / 2 = 684 (the remainder is 0, so 2 is a divisor of 1368)
  • 1368 / 3 = 456 (the remainder is 0, so 3 is a divisor of 1368)
  • ...
  • 1368 / 1367 = 1.0007315288954 (the remainder is 1, so 1367 is not a divisor of 1368)
  • 1368 / 1368 = 1 (the remainder is 0, so 1368 is a divisor of 1368)

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 1368 (i.e. 36.986484017814). 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 )

  • 1368 / 1 = 1368 (the remainder is 0, so 1 and 1368 are divisors of 1368)
  • 1368 / 2 = 684 (the remainder is 0, so 2 and 684 are divisors of 1368)
  • 1368 / 3 = 456 (the remainder is 0, so 3 and 456 are divisors of 1368)
  • ...
  • 1368 / 35 = 39.085714285714 (the remainder is 3, so 35 is not a divisor of 1368)
  • 1368 / 36 = 38 (the remainder is 0, so 36 and 38 are divisors of 1368)