Question:

Finding all the factors of a number fast?

by  |  earlier

0 LIKES UnLike

I was wondering what's the fastest way to find all the factors to a number higher than 50? It takes me sometimes as much as 10-15min to solve one problem which is way too long.

 Tags:

   Report

1 ANSWERS


  1. Compute the prime factorization first. You can make a tree.

    For example, to factor 50: Put 50 at the top of a piece of a paper. Then draw two lines diagonally, connecting to 2 and 25. 2 is prime, so that branch of the tree stops; but we can further factor 25. So draw 2 lines diagonally down from 25, leading to 5 and 5. These are prime, so we stop.

    So 50 = 2 * 5^2.

    Now, systematically take all the combinations of primes that you can. This gives the factors as 1, 2, 5, 5^2, 2 * 5, and 2 * 5^2. So the factors of 50 are 1, 2, 5, 10, 25, and 50.

    ---

    Let's also do 60, for practice. 60 splits into 2 and 30. 30 further splits into 2 and 15. 15 splits into 3 and 5. So 60 = 2^2 * 3 * 5

    So the factors of 60 are 1, 2, 3, 5, 2 * 3, 2 * 5, 3* 5, 2^2, 2^2 * 3, 2^2 * 5, 2 * 3 * 5, and 2^2 * 3 * 5.

    These are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, and 60.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.