Sieve and various prime methods for problem 3, only the last is remotely efficient