Question 179651: Hello I have a question regarding the easiest way to find the positive divisors of a number. I know there is a way to find them in a quick way instead of going through every number.
For example I have this number 372. and even though I got the answer, it willtake me for ever to come up with 1,2,3,4,6,12,32,62,93,124,186,372.
Please can you explain me how can I find the positive divisors more effectively?
Thanks you as always
Answer by Mathtut(3670) (Show Source):
You can put this solution on YOUR website! You just have to obtain the prime factor decomposition of the number and then to combine those factors in all possible forms.
If they only ask you only by the NUMBER of divisors, that's a lot easier. It's only a problem of counting. For example:
756 = (3^3) * (2^2) * 7
Any factor you may have will be a combination (product) of these factors. You have available 3 "3"s, 2 "2"s and 1 "7", so
# of ways factor "3" may appear = 3 + 1 = 4 (3^0, 3^1, 3^2, 3^3)
# of ways factor "2" may appear = 2 + 1 = 3 (2^0, 2^1, 2^2)
# of ways factor "7" may appear = 1 + 1 = 2 (7^0, 7^1)
thus: # of ways these factors may be combined = 4*3*2 = 24
=> there are 24 factors
general rule: just multiply the exponents increased by 1
N = (p1^e1)*(p2^e2)....(pn^en) (p1...pn different prime numbers)
#_factors(N) = (e1 + 1)*(e2 + 1)....(en + 1)
|
|
|