David Pollack Wrote:Sure, there is! It just depends on how many prime factors your number has, and how many times each one appears.
Suppose your number factors as a product p^a * q^b * .... *r^k. Then to get any factor you want you should take _up to_ a copies of p, _up to_ b copies of q, etc. and multiply them all together. The number of ways you can choose _up to_ a copies of p is (a+1) since you could choose 0 copies, 1 copy, 2 copies, ..., a copies. Likewise there are (b+1) ways to choose how many q's to include, etc.
So the number of factors for your number would be (a+1)*(b+1)*...(k+1).
For example, if your number is 441 = 3^2 * 7^2 then the number of factors is (2+1)*(2+1)=3*3=9.
One more example: if your number is 360 = 8*9*5 = 2^3 * 3^2 * 5^1 then the number of factors is (3+1)*(2+1)*(1+1)=24.
RPurewal Wrote:David Pollack Wrote:Sure, there is! It just depends on how many prime factors your number has, and how many times each one appears.
Suppose your number factors as a product p^a * q^b * .... *r^k. Then to get any factor you want you should take _up to_ a copies of p, _up to_ b copies of q, etc. and multiply them all together. The number of ways you can choose _up to_ a copies of p is (a+1) since you could choose 0 copies, 1 copy, 2 copies, ..., a copies. Likewise there are (b+1) ways to choose how many q's to include, etc.
So the number of factors for your number would be (a+1)*(b+1)*...(k+1).
For example, if your number is 441 = 3^2 * 7^2 then the number of factors is (2+1)*(2+1)=3*3=9.
One more example: if your number is 360 = 8*9*5 = 2^3 * 3^2 * 5^1 then the number of factors is (3+1)*(2+1)*(1+1)=24.
this is just awesome. very well done.
i have some unsolicited advice for you:
step 1) drop whatever you're doing
step 2) write a textbook
step 3) resume whatever you're doing
thank you for saving us the time required to answer this ourselves. :)
iil-london Wrote:Hi there ...
what is the quickest way to find the prime factors for a number ?
How would you find the prime factors of 3841, for example ?
Does anyone know of a quick way to do it.
Thanks for the help. Appreciate it.