Calculator finds prime factorization of a given number and creates a factor tree. The calculator generates a step by step explanation on how the work has been done.
problem
Find the prime factorization of number 300.
solution
The prime factorization of 300 is:
$$ 300 = 2\cdot2\cdot3\cdot5\cdot5 $$Which is the same as :
$$ 300 = 2^{2}\cdot3\cdot5^{2} $$explanation
Prime factorization can be nicely visualised by creating a factorization tree.
300 can be written as 10 × 30. |
|
10 can be written as 2 × 5. |
|
30 can be written as 10 × 3. |
|
10 can be written as 2 × 5. |
|
The end nodes are the prime factors of the number 300. |
|
Example: Find prime factorization of 60.
Step 1: Start with any number that divides 60, in this we will use 10. So, $ \color{blue}{60 = 6 \cdot 10} $.
Step 2: Write 10 as a product of 2 and 5. $ \color{blue}{10 = 2 \cdot 5} $.
Step 3: Write 6 as a product of 2 and 3. $ 6 = 2 \cdot 3 $.
Step 4: The end nodes are the prime factors of 60.
Example: Find all factors of 54.
Step 1: Begin the list with 1 and end it with 54.
Step 2: Since $ 54 = 2 \cdot 27 $ we put in 2 and 27 into an array.
Step 3: Since $ 54 = 3 \cdot 18 $ so we will put in 3 and 18 into an array.
Step 4:At the end we have $ 54 = 6 \cdot 9 $
Example: Check whether a number 581 is prime or not.
Step 1: Find the square root of 581.
Step 2: Try to divide 581 by all prime numbers less or equal to 25.
In this example we will try to divide 581 with :
2 , 3, 5, 7, 11, 13, 17, 19 and 23.
$$ \begin{aligned} 581 : 2 & = 290.5 \\ 581 : 3 & = 484 \\ 581 : 5 &= 116.2 \\ 581 : 7 &= 83 \end{aligned} $$
581 is divisible by 3 so is is not prime.
Please tell me how can I make this better.