What are the divisors of 368?
1, 2, 4, 8, 16, 23, 46, 92, 184, 368
- There is a total of 10 positive divisors.
- The sum of these divisors is 744.
- The arithmetic mean is 74.4.
8 even divisors
2, 4, 8, 16, 46, 92, 184, 368
2 odd divisors
1, 23
How to compute the divisors of 368?
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.
Brute force algorithm
We could start by using a brute-force method which would involve dividing 368 by each of the numbers from 1 to 368 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 368 / 1 = 368 (the remainder is 0, so 1 is a divisor of 368)
- 368 / 2 = 184 (the remainder is 0, so 2 is a divisor of 368)
- 368 / 3 = 122.66666666667 (the remainder is 2, so 3 is not a divisor of 368)
- ...
- 368 / 367 = 1.0027247956403 (the remainder is 1, so 367 is not a divisor of 368)
- 368 / 368 = 1 (the remainder is 0, so 368 is a divisor of 368)
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 368 (i.e. 19.183326093251). Indeed, if a number N has a divisor D greater than its square root, then there is necessarily a smaller divisor d such that:
(thus, if , then )
- 368 / 1 = 368 (the remainder is 0, so 1 and 368 are divisors of 368)
- 368 / 2 = 184 (the remainder is 0, so 2 and 184 are divisors of 368)
- 368 / 3 = 122.66666666667 (the remainder is 2, so 3 is not a divisor of 368)
- ...
- 368 / 18 = 20.444444444444 (the remainder is 8, so 18 is not a divisor of 368)
- 368 / 19 = 19.368421052632 (the remainder is 7, so 19 is not a divisor of 368)