Fix isprime algorithm and clarify that only comparing to the sqrt is quicker.
Solve 8, 9, and 10.