Explanation:
Here is list of the first few primes = {2, 3, 5, 7, 11}
Divide 42 over the smallest prime 2 and we get
42/2 = 21
This shows that 2 is a factor (since we get a whole number result).
We don't have another factor of 2 because 21/2 = 10.5 isn't a whole number. But 3 is a factor because 21/3 = 7
Ultimately the numbers 2, 3 and 7 are factors of 42. They are the only prime factors and there's only one copy of each.
42 = 2*3*7
Check out the diagram below. It shows two different ways to generate a factor tree for the number 42.