Working on Problem 3.
More variations on trial division.