Solution for p47
Improve prime factor research