Problem 3 completed - I found this quite difficult and looked up methods for quickest way of finding prime factors as my initial try took too many iterations