What are the divisors of 663?
1, 3, 13, 17, 39, 51, 221, 663
- There is a total of 8 positive divisors.
- The sum of these divisors is 1008.
- The arithmetic mean is 126.
8 odd divisors
1, 3, 13, 17, 39, 51, 221, 663
How to compute the divisors of 663?
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 663 by each of the numbers from 1 to 663 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 663 / 1 = 663 (the remainder is 0, so 1 is a divisor of 663)
- 663 / 2 = 331.5 (the remainder is 1, so 2 is not a divisor of 663)
- 663 / 3 = 221 (the remainder is 0, so 3 is a divisor of 663)
- ...
- 663 / 662 = 1.0015105740181 (the remainder is 1, so 662 is not a divisor of 663)
- 663 / 663 = 1 (the remainder is 0, so 663 is a divisor of 663)
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 663 (i.e. 25.748786379167). 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 )
- 663 / 1 = 663 (the remainder is 0, so 1 and 663 are divisors of 663)
- 663 / 2 = 331.5 (the remainder is 1, so 2 is not a divisor of 663)
- 663 / 3 = 221 (the remainder is 0, so 3 and 221 are divisors of 663)
- ...
- 663 / 24 = 27.625 (the remainder is 15, so 24 is not a divisor of 663)
- 663 / 25 = 26.52 (the remainder is 13, so 25 is not a divisor of 663)