problem3 bugfix, prime duplicates