What are the divisors of 3965?
1, 5, 13, 61, 65, 305, 793, 3965
- There is a total of 8 positive divisors.
- The sum of these divisors is 5208.
- The arithmetic mean is 651.
8 odd divisors
1, 5, 13, 61, 65, 305, 793, 3965
How to compute the divisors of 3965?
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 3965 by each of the numbers from 1 to 3965 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3965 / 1 = 3965 (the remainder is 0, so 1 is a divisor of 3965)
- 3965 / 2 = 1982.5 (the remainder is 1, so 2 is not a divisor of 3965)
- 3965 / 3 = 1321.6666666667 (the remainder is 2, so 3 is not a divisor of 3965)
- ...
- 3965 / 3964 = 1.0002522704339 (the remainder is 1, so 3964 is not a divisor of 3965)
- 3965 / 3965 = 1 (the remainder is 0, so 3965 is a divisor of 3965)
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 3965 (i.e. 62.968245965725). 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 )
- 3965 / 1 = 3965 (the remainder is 0, so 1 and 3965 are divisors of 3965)
- 3965 / 2 = 1982.5 (the remainder is 1, so 2 is not a divisor of 3965)
- 3965 / 3 = 1321.6666666667 (the remainder is 2, so 3 is not a divisor of 3965)
- ...
- 3965 / 61 = 65 (the remainder is 0, so 61 and 65 are divisors of 3965)
- 3965 / 62 = 63.951612903226 (the remainder is 59, so 62 is not a divisor of 3965)