351 = 3 * 3 * 3 * 13
"Factor trees" are used when teaching students about factorization, and are meant to be done out by hand. In almost all cases, numbers used in factor tree exercises will only contain the "easy primes" (2, 3, 5) and possibly one other prime. (This only applies to some education curricula, and not to more general problems)
When writing out the factor tree, start by removing factors of 2 and 5, as these are the easiest to check for. When none remain, check if their are factors of 3 in the number.
The prime factorization.
2x2x222
51 3,17
by using a prime factor tree
88 44,2 22,2,2 11,2,2,2
It is: 3*17 = 51
27 9,3 3,3,3
956 478,2 239,2,2
52 26,2 13,2,2
92 46,2 23,2,2
28 14,2 7,2,2
That's prime factorization. 45 15,3 5,3,3