added memoization for primes & changed test(s)
solved problem 3