What are the divisors of 742?
1, 2, 7, 14, 53, 106, 371, 742
- There is a total of 8 positive divisors.
- The sum of these divisors is 1296.
- The arithmetic mean is 162.
4 even divisors
2, 14, 106, 742
4 odd divisors
1, 7, 53, 371
How to compute the divisors of 742?
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 742 by each of the numbers from 1 to 742 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 742 / 1 = 742 (the remainder is 0, so 1 is a divisor of 742)
- 742 / 2 = 371 (the remainder is 0, so 2 is a divisor of 742)
- 742 / 3 = 247.33333333333 (the remainder is 1, so 3 is not a divisor of 742)
- ...
- 742 / 741 = 1.0013495276653 (the remainder is 1, so 741 is not a divisor of 742)
- 742 / 742 = 1 (the remainder is 0, so 742 is a divisor of 742)
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 742 (i.e. 27.239676943752). 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 )
- 742 / 1 = 742 (the remainder is 0, so 1 and 742 are divisors of 742)
- 742 / 2 = 371 (the remainder is 0, so 2 and 371 are divisors of 742)
- 742 / 3 = 247.33333333333 (the remainder is 1, so 3 is not a divisor of 742)
- ...
- 742 / 26 = 28.538461538462 (the remainder is 14, so 26 is not a divisor of 742)
- 742 / 27 = 27.481481481481 (the remainder is 13, so 27 is not a divisor of 742)