problem 3, computing prime factors