What are the divisors of 48?
1, 2, 3, 4, 6, 8, 12, 16, 24, 48
- There is a total of 10 positive divisors.
- The sum of these divisors is 124.
- The arithmetic mean is 12.4.
8 even divisors
2, 4, 6, 8, 12, 16, 24, 48
2 odd divisors
1, 3
How to compute the divisors of 48?
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 48 by each of the numbers from 1 to 48 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 48 / 1 = 48 (the remainder is 0, so 1 is a divisor of 48)
- 48 / 2 = 24 (the remainder is 0, so 2 is a divisor of 48)
- 48 / 3 = 16 (the remainder is 0, so 3 is a divisor of 48)
- ...
- 48 / 47 = 1.0212765957447 (the remainder is 1, so 47 is not a divisor of 48)
- 48 / 48 = 1 (the remainder is 0, so 48 is a divisor of 48)
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 48 (i.e. 6.9282032302755). 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 )
- 48 / 1 = 48 (the remainder is 0, so 1 and 48 are divisors of 48)
- 48 / 2 = 24 (the remainder is 0, so 2 and 24 are divisors of 48)
- 48 / 3 = 16 (the remainder is 0, so 3 and 16 are divisors of 48)
- ...
- 48 / 5 = 9.6 (the remainder is 3, so 5 is not a divisor of 48)
- 48 / 6 = 8 (the remainder is 0, so 6 and 8 are divisors of 48)