What are the divisors of 3838?
1, 2, 19, 38, 101, 202, 1919, 3838
- There is a total of 8 positive divisors.
- The sum of these divisors is 6120.
- The arithmetic mean is 765.
4 even divisors
2, 38, 202, 3838
4 odd divisors
1, 19, 101, 1919
How to compute the divisors of 3838?
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 3838 by each of the numbers from 1 to 3838 to determine which ones have a remainder equal to 0.
(where is the integer part of the quotient)
- 3838 / 1 = 3838 (the remainder is 0, so 1 is a divisor of 3838)
- 3838 / 2 = 1919 (the remainder is 0, so 2 is a divisor of 3838)
- 3838 / 3 = 1279.3333333333 (the remainder is 1, so 3 is not a divisor of 3838)
- ...
- 3838 / 3837 = 1.0002606202763 (the remainder is 1, so 3837 is not a divisor of 3838)
- 3838 / 3838 = 1 (the remainder is 0, so 3838 is a divisor of 3838)
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 3838 (i.e. 61.951594006934). 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 )
- 3838 / 1 = 3838 (the remainder is 0, so 1 and 3838 are divisors of 3838)
- 3838 / 2 = 1919 (the remainder is 0, so 2 and 1919 are divisors of 3838)
- 3838 / 3 = 1279.3333333333 (the remainder is 1, so 3 is not a divisor of 3838)
- ...
- 3838 / 60 = 63.966666666667 (the remainder is 58, so 60 is not a divisor of 3838)
- 3838 / 61 = 62.918032786885 (the remainder is 56, so 61 is not a divisor of 3838)